home *** CD-ROM | disk | FTP | other *** search
/ IRIX Patches 1995 June / SGI IRIX Patches 1995 Jun.iso / 5.3_patches / patchSG0000499 / patchSG0000499.idb / usr / include / abi / X11 / Xlib.h.z / Xlib.h
Encoding:
C/C++ Source or Header  |  1995-06-12  |  97.8 KB  |  4,299 lines

  1. /* $XConsortium: Xlib.h,v 11.219 93/02/15 11:13:18 rws Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #ifdef USG
  31. #ifndef __TYPES__
  32. #include <sys/types.h>            /* forgot to protect it... */
  33. #define __TYPES__
  34. #endif /* __TYPES__ */
  35. #else
  36. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  37. #undef _POSIX_SOURCE
  38. #include <sys/types.h>
  39. #define _POSIX_SOURCE
  40. #else
  41. #include <sys/types.h>
  42. #endif
  43. #endif /* USG */
  44.  
  45. #include <X11/X.h>
  46.  
  47. /* applications should not depend on these two headers being included! */
  48. #include <X11/Xfuncproto.h>
  49. #include <X11/Xosdefs.h>
  50.  
  51. #ifndef X_WCHAR
  52. #ifdef X_NOT_STDC_ENV
  53. #define X_WCHAR
  54. #endif
  55. #endif
  56.  
  57. #ifndef X_WCHAR        /* X_WCHAR should be defined in IRIX 4.0 build */
  58. #include <stddef.h>
  59. #else
  60. #if defined(sgi) || defined(__sgi)
  61. #include <stddef.h>
  62. #if !defined(_WCHAR_T_) && !defined(_WCHAR_T)
  63. #define _WCHAR_T
  64. #define _WCHAR_T_
  65. typedef unsigned char wchar_t;
  66. #endif
  67. #else /* ! sgi */
  68. typedef unsigned long wchar_t;
  69. #endif /* sgi */
  70. #endif /* X_WCHAR */
  71.  
  72. typedef char *XPointer;
  73.  
  74. #define Bool int
  75. #define Status int
  76. #define True 1
  77. #define False 0
  78.  
  79. #define QueuedAlready 0
  80. #define QueuedAfterReading 1
  81. #define QueuedAfterFlush 2
  82.  
  83. #define ConnectionNumber(dpy)     (((_XPrivDisplay)dpy)->fd)
  84. #define RootWindow(dpy, scr)     (ScreenOfDisplay(dpy,scr)->root)
  85. #define DefaultScreen(dpy)     (((_XPrivDisplay)dpy)->default_screen)
  86. #define DefaultRootWindow(dpy)     (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
  87. #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
  88. #define DefaultGC(dpy, scr)     (ScreenOfDisplay(dpy,scr)->default_gc)
  89. #define BlackPixel(dpy, scr)     (ScreenOfDisplay(dpy,scr)->black_pixel)
  90. #define WhitePixel(dpy, scr)     (ScreenOfDisplay(dpy,scr)->white_pixel)
  91. #define AllPlanes         ((unsigned long)~0L)
  92. #define QLength(dpy)         (((_XPrivDisplay)dpy)->qlen)
  93. #define DisplayWidth(dpy, scr)     (ScreenOfDisplay(dpy,scr)->width)
  94. #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
  95. #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
  96. #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
  97. #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
  98. #define DisplayCells(dpy, scr)     (DefaultVisual(dpy,scr)->map_entries)
  99. #define ScreenCount(dpy)     (((_XPrivDisplay)dpy)->nscreens)
  100. #define ServerVendor(dpy)     (((_XPrivDisplay)dpy)->vendor)
  101. #define ProtocolVersion(dpy)     (((_XPrivDisplay)dpy)->proto_major_version)
  102. #define ProtocolRevision(dpy)     (((_XPrivDisplay)dpy)->proto_minor_version)
  103. #define VendorRelease(dpy)     (((_XPrivDisplay)dpy)->release)
  104. #define DisplayString(dpy)     (((_XPrivDisplay)dpy)->display_name)
  105. #define DefaultDepth(dpy, scr)     (ScreenOfDisplay(dpy,scr)->root_depth)
  106. #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
  107. #define BitmapUnit(dpy)     (((_XPrivDisplay)dpy)->bitmap_unit)
  108. #define BitmapBitOrder(dpy)     (((_XPrivDisplay)dpy)->bitmap_bit_order)
  109. #define BitmapPad(dpy)         (((_XPrivDisplay)dpy)->bitmap_pad)
  110. #define ImageByteOrder(dpy)     (((_XPrivDisplay)dpy)->byte_order)
  111. #define NextRequest(dpy)    (((_XPrivDisplay)dpy)->request + 1)
  112. #define LastKnownRequestProcessed(dpy)    (((_XPrivDisplay)dpy)->last_request_read)
  113.  
  114. /* macros for screen oriented applications (toolkit) */
  115. #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
  116. #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
  117. #define DisplayOfScreen(s)    ((s)->display)
  118. #define RootWindowOfScreen(s)    ((s)->root)
  119. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  120. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  121. #define DefaultColormapOfScreen(s)((s)->cmap)
  122. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  123. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  124. #define DefaultVisualOfScreen(s)((s)->root_visual)
  125. #define WidthOfScreen(s)    ((s)->width)
  126. #define HeightOfScreen(s)    ((s)->height)
  127. #define WidthMMOfScreen(s)    ((s)->mwidth)
  128. #define HeightMMOfScreen(s)    ((s)->mheight)
  129. #define PlanesOfScreen(s)    ((s)->root_depth)
  130. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  131. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  132. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  133. #define DoesSaveUnders(s)    ((s)->save_unders)
  134. #define DoesBackingStore(s)    ((s)->backing_store)
  135. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  136.  
  137. /*
  138.  * Extensions need a way to hang private data on some structures.
  139.  */
  140. typedef struct _XExtData {
  141.     int number;        /* number returned by XRegisterExtension */
  142.     struct _XExtData *next;    /* next item on list of data for structure */
  143.     int (*free_private)();    /* called to free private storage */
  144.     XPointer private_data;    /* data private to this extension. */
  145. } XExtData;
  146.  
  147. /*
  148.  * This file contains structures used by the extension mechanism.
  149.  */
  150. typedef struct {        /* public to extension, cannot be changed */
  151.     int extension;        /* extension number */
  152.     int major_opcode;    /* major op-code assigned by server */
  153.     int first_event;    /* first event number for the extension */
  154.     int first_error;    /* first error number for the extension */
  155. } XExtCodes;
  156.  
  157. /*
  158.  * Data structure for retrieving info about pixmap formats.
  159.  */
  160.  
  161. typedef struct {
  162.     int depth;
  163.     int bits_per_pixel;
  164.     int scanline_pad;
  165. } XPixmapFormatValues;
  166.  
  167.  
  168. /*
  169.  * Data structure for setting graphics context.
  170.  */
  171. typedef struct {
  172.     int function;        /* logical operation */
  173.     unsigned long plane_mask;/* plane mask */
  174.     unsigned long foreground;/* foreground pixel */
  175.     unsigned long background;/* background pixel */
  176.     int line_width;        /* line width */
  177.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  178.     int cap_style;          /* CapNotLast, CapButt, 
  179.                    CapRound, CapProjecting */
  180.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  181.     int fill_style;         /* FillSolid, FillTiled, 
  182.                    FillStippled, FillOpaeueStippled */
  183.     int fill_rule;          /* EvenOddRule, WindingRule */
  184.     int arc_mode;        /* ArcChord, ArcPieSlice */
  185.     Pixmap tile;        /* tile pixmap for tiling operations */
  186.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  187.     int ts_x_origin;    /* offset for tile or stipple operations */
  188.     int ts_y_origin;
  189.         Font font;            /* default text font for text operations */
  190.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  191.     Bool graphics_exposures;/* boolean, should exposures be generated */
  192.     int clip_x_origin;    /* origin for clipping */
  193.     int clip_y_origin;
  194.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  195.     int dash_offset;    /* patterned/dashed line information */
  196.     char dashes;
  197. } XGCValues;
  198.  
  199. /*
  200.  * Graphics context.  The contents of this structure are implementation
  201.  * dependent.  A GC should be treated as opaque by application code.
  202.  */
  203.  
  204. typedef struct _XGC
  205. #ifdef XLIB_ILLEGAL_ACCESS
  206. {
  207.     XExtData *ext_data;    /* hook for extension to hang data */
  208.     GContext gid;    /* protocol ID for graphics context */
  209.     /* there is more to this structure, but it is private to Xlib */
  210. }
  211. #endif
  212. *GC;
  213.  
  214. /*
  215.  * Visual structure; contains information about colormapping possible.
  216.  */
  217. typedef struct {
  218.     XExtData *ext_data;    /* hook for extension to hang data */
  219.     VisualID visualid;    /* visual id of this visual */
  220. #if defined(__cplusplus) || defined(c_plusplus)
  221.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  222. #else
  223.     int class;        /* class of screen (monochrome, etc.) */
  224. #endif
  225.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  226.     int bits_per_rgb;    /* log base 2 of distinct color values */
  227.     int map_entries;    /* color map entries */
  228. } Visual;
  229.  
  230. /*
  231.  * Depth structure; contains information for each possible depth.
  232.  */    
  233. typedef struct {
  234.     int depth;        /* this depth (Z) of the depth */
  235.     int nvisuals;        /* number of Visual types at this depth */
  236.     Visual *visuals;    /* list of visuals possible at this depth */
  237. } Depth;
  238.  
  239. /*
  240.  * Information about the screen.  The contents of this structure are
  241.  * implementation dependent.  A Screen should be treated as opaque
  242.  * by application code.
  243.  */
  244. typedef struct {
  245.     XExtData *ext_data;    /* hook for extension to hang data */
  246.     struct _XDisplay *display;/* back pointer to display structure */
  247.     Window root;        /* Root window id. */
  248.     int width, height;    /* width and height of screen */
  249.     int mwidth, mheight;    /* width and height of  in millimeters */
  250.     int ndepths;        /* number of depths possible */
  251.     Depth *depths;        /* list of allowable depths on the screen */
  252.     int root_depth;        /* bits per pixel */
  253.     Visual *root_visual;    /* root visual */
  254.     GC default_gc;        /* GC for the root root visual */
  255.     Colormap cmap;        /* default color map */
  256.     unsigned long white_pixel;
  257.     unsigned long black_pixel;    /* White and Black pixel values */
  258.     int max_maps, min_maps;    /* max and min color maps */
  259.     int backing_store;    /* Never, WhenMapped, Always */
  260.     Bool save_unders;    
  261.     long root_input_mask;    /* initial root input mask */
  262. } Screen;
  263.  
  264. /*
  265.  * Format structure; describes ZFormat data the screen will understand.
  266.  */
  267. typedef struct {
  268.     XExtData *ext_data;    /* hook for extension to hang data */
  269.     int depth;        /* depth of this image format */
  270.     int bits_per_pixel;    /* bits/pixel at this depth */
  271.     int scanline_pad;    /* scanline must padded to this multiple */
  272. } ScreenFormat;
  273.  
  274. /*
  275.  * Data structure for setting window attributes.
  276.  */
  277. typedef struct {
  278.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  279.     unsigned long background_pixel;    /* background pixel */
  280.     Pixmap border_pixmap;    /* border of the window */
  281.     unsigned long border_pixel;    /* border pixel value */
  282.     int bit_gravity;        /* one of bit gravity values */
  283.     int win_gravity;        /* one of the window gravity values */
  284.     int backing_store;        /* NotUseful, WhenMapped, Always */
  285.     unsigned long backing_planes;/* planes to be preseved if possible */
  286.     unsigned long backing_pixel;/* value to use in restoring planes */
  287.     Bool save_under;        /* should bits under be saved? (popups) */
  288.     long event_mask;        /* set of events that should be saved */
  289.     long do_not_propagate_mask;    /* set of events that should not propagate */
  290.     Bool override_redirect;    /* boolean value for override-redirect */
  291.     Colormap colormap;        /* color map to be associated with window */
  292.     Cursor cursor;        /* cursor to be displayed (or None) */
  293. } XSetWindowAttributes;
  294.  
  295. typedef struct {
  296.     int x, y;            /* location of window */
  297.     int width, height;        /* width and height of window */
  298.     int border_width;        /* border width of window */
  299.     int depth;              /* depth of window */
  300.     Visual *visual;        /* the associated visual structure */
  301.     Window root;            /* root of screen containing window */
  302. #if defined(__cplusplus) || defined(c_plusplus)
  303.     int c_class;        /* C++ InputOutput, InputOnly*/
  304. #else
  305.     int class;            /* InputOutput, InputOnly*/
  306. #endif
  307.     int bit_gravity;        /* one of bit gravity values */
  308.     int win_gravity;        /* one of the window gravity values */
  309.     int backing_store;        /* NotUseful, WhenMapped, Always */
  310.     unsigned long backing_planes;/* planes to be preserved if possible */
  311.     unsigned long backing_pixel;/* value to be used when restoring planes */
  312.     Bool save_under;        /* boolean, should bits under be saved? */
  313.     Colormap colormap;        /* color map to be associated with window */
  314.     Bool map_installed;        /* boolean, is color map currently installed*/
  315.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  316.     long all_event_masks;    /* set of events all people have interest in*/
  317.     long your_event_mask;    /* my event mask */
  318.     long do_not_propagate_mask; /* set of events that should not propagate */
  319.     Bool override_redirect;    /* boolean value for override-redirect */
  320.     Screen *screen;        /* back pointer to correct screen */
  321. } XWindowAttributes;
  322.  
  323. /*
  324.  * Data structure for host setting; getting routines.
  325.  *
  326.  */
  327.  
  328. typedef struct {
  329.     int family;        /* for example FamilyInternet */
  330.     int length;        /* length of address, in bytes */
  331.     char *address;        /* pointer to where to find the bytes */
  332. } XHostAddress;
  333.  
  334. /*
  335.  * Data structure for "image" data, used by image manipulation routines.
  336.  */
  337. typedef struct _XImage {
  338.     int width, height;        /* size of image */
  339.     int xoffset;        /* number of pixels offset in X direction */
  340.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  341.     char *data;            /* pointer to image data */
  342.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  343.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  344.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  345.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  346.     int depth;            /* depth of image */
  347.     int bytes_per_line;        /* accelarator to next line */
  348.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  349.     unsigned long red_mask;    /* bits in z arrangment */
  350.     unsigned long green_mask;
  351.     unsigned long blue_mask;
  352.     XPointer obdata;        /* hook for the object routines to hang on */
  353.     struct funcs {        /* image manipulation routines */
  354.     struct _XImage *(*create_image)();
  355. #if NeedFunctionPrototypes
  356.     int (*destroy_image)        (struct _XImage *);
  357.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  358.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  359.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  360.     int (*add_pixel)            (struct _XImage *, long);
  361. #else
  362.     int (*destroy_image)();
  363.     unsigned long (*get_pixel)();
  364.     int (*put_pixel)();
  365.     struct _XImage *(*sub_image)();
  366.     int (*add_pixel)();
  367. #endif
  368.     } f;
  369. } XImage;
  370.  
  371. /* 
  372.  * Data structure for XReconfigureWindow
  373.  */
  374. typedef struct {
  375.     int x, y;
  376.     int width, height;
  377.     int border_width;
  378.     Window sibling;
  379.     int stack_mode;
  380. } XWindowChanges;
  381.  
  382. /*
  383.  * Data structure used by color operations
  384.  */
  385. typedef struct {
  386.     unsigned long pixel;
  387.     unsigned short red, green, blue;
  388.     char flags;  /* do_red, do_green, do_blue */
  389.     char pad;
  390. } XColor;
  391.  
  392. /* 
  393.  * Data structures for graphics operations.  On most machines, these are
  394.  * congruent with the wire protocol structures, so reformatting the data
  395.  * can be avoided on these architectures.
  396.  */
  397. typedef struct {
  398.     short x1, y1, x2, y2;
  399. } XSegment;
  400.  
  401. typedef struct {
  402.     short x, y;
  403. } XPoint;
  404.     
  405. typedef struct {
  406.     short x, y;
  407.     unsigned short width, height;
  408. } XRectangle;
  409.     
  410. typedef struct {
  411.     short x, y;
  412.     unsigned short width, height;
  413.     short angle1, angle2;
  414. } XArc;
  415.  
  416.  
  417. /* Data structure for XChangeKeyboardControl */
  418.  
  419. typedef struct {
  420.         int key_click_percent;
  421.         int bell_percent;
  422.         int bell_pitch;
  423.         int bell_duration;
  424.         int led;
  425.         int led_mode;
  426.         int key;
  427.         int auto_repeat_mode;   /* On, Off, Default */
  428. } XKeyboardControl;
  429.  
  430. /* Data structure for XGetKeyboardControl */
  431.  
  432. typedef struct {
  433.         int key_click_percent;
  434.     int bell_percent;
  435.     unsigned int bell_pitch, bell_duration;
  436.     unsigned long led_mask;
  437.     int global_auto_repeat;
  438.     char auto_repeats[32];
  439. } XKeyboardState;
  440.  
  441. /* Data structure for XGetMotionEvents.  */
  442.  
  443. typedef struct {
  444.         Time time;
  445.     short x, y;
  446. } XTimeCoord;
  447.  
  448. /* Data structure for X{Set,Get}ModifierMapping */
  449.  
  450. typedef struct {
  451.      int max_keypermod;    /* The server's max # of keys per modifier */
  452.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  453. } XModifierKeymap;
  454.  
  455.  
  456. /*
  457.  * Display datatype maintaining display specific data.
  458.  * The contents of this structure are implementation dependent.
  459.  * A Display should be treated as opaque by application code.
  460.  */
  461. #ifndef XLIB_ILLEGAL_ACCESS
  462. typedef struct _XDisplay Display;
  463. #endif
  464.  
  465. typedef struct 
  466. #ifdef XLIB_ILLEGAL_ACCESS
  467. _XDisplay
  468. #endif
  469. {
  470.     XExtData *ext_data;    /* hook for extension to hang data */
  471.     struct _XPrivate *private1;
  472.     int fd;            /* Network socket. */
  473.     int private2;
  474.     int proto_major_version;/* major version of server's X protocol */
  475.     int proto_minor_version;/* minor version of servers X protocol */
  476.     char *vendor;        /* vendor of the server hardware */
  477.         XID private3;
  478.     XID private4;
  479.     XID private5;
  480.     int private6;
  481. #if NeedFunctionPrototypes
  482.     XID (*resource_alloc)(struct _XDisplay *);/* allocator function */
  483. #else 
  484.     XID (*resource_alloc)();/* allocator function */
  485. #endif
  486.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  487.     int bitmap_unit;    /* padding and data requirements */
  488.     int bitmap_pad;        /* padding requirements on bitmaps */
  489.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  490.     int nformats;        /* number of pixmap formats in list */
  491.     ScreenFormat *pixmap_format;    /* pixmap format list */
  492.     int private8;
  493.     int release;        /* release of the server */
  494.     struct _XPrivate *private9, *private10;
  495.     int qlen;        /* Length of input event queue */
  496.     unsigned long last_request_read; /* seq number of last event read */
  497.     unsigned long request;    /* sequence number of last request. */
  498.     XPointer private11;
  499.     XPointer private12;
  500.     XPointer private13;
  501.     XPointer private14;
  502.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  503.     struct _XrmHashBucketRec *db;
  504.     int (*private15)();
  505.     char *display_name;    /* "host:display" string used on this connect*/
  506.     int default_screen;    /* default screen for operations */
  507.     int nscreens;        /* number of screens on this server*/
  508.     Screen *screens;    /* pointer to list of screens */
  509.     unsigned long motion_buffer;    /* size of motion buffer */
  510.     unsigned long private16;
  511.     int min_keycode;    /* minimum defined keycode */
  512.     int max_keycode;    /* maximum defined keycode */
  513.     /* there is more to this structure, but it is private to Xlib */
  514. }
  515. #ifdef XLIB_ILLEGAL_ACCESS
  516. Display, 
  517. #endif
  518. *_XPrivDisplay;
  519.  
  520. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  521. #undef _XEVENT_
  522. #endif
  523. #ifndef _XEVENT_
  524. /*
  525.  * Definitions of specific events.
  526.  */
  527. typedef struct {
  528.     int type;        /* of event */
  529.     unsigned long serial;    /* # of last request processed by server */
  530.     Bool send_event;    /* true if this came from a SendEvent request */
  531.     Display *display;    /* Display the event was read from */
  532.     Window window;            /* "event" window it is reported relative to */
  533.     Window root;            /* root window that the event occured on */
  534.     Window subwindow;    /* child window */
  535.     Time time;        /* milliseconds */
  536.     int x, y;        /* pointer x, y coordinates in event window */
  537.     int x_root, y_root;    /* coordinates relative to root */
  538.     unsigned int state;    /* key or button mask */
  539.     unsigned int keycode;    /* detail */
  540.     Bool same_screen;    /* same screen flag */
  541. } XKeyEvent;
  542. typedef XKeyEvent XKeyPressedEvent;
  543. typedef XKeyEvent XKeyReleasedEvent;
  544.  
  545. typedef struct {
  546.     int type;        /* of event */
  547.     unsigned long serial;    /* # of last request processed by server */
  548.     Bool send_event;    /* true if this came from a SendEvent request */
  549.     Display *display;    /* Display the event was read from */
  550.     Window window;            /* "event" window it is reported relative to */
  551.     Window root;            /* root window that the event occured on */
  552.     Window subwindow;    /* child window */
  553.     Time time;        /* milliseconds */
  554.     int x, y;        /* pointer x, y coordinates in event window */
  555.     int x_root, y_root;    /* coordinates relative to root */
  556.     unsigned int state;    /* key or button mask */
  557.     unsigned int button;    /* detail */
  558.     Bool same_screen;    /* same screen flag */
  559. } XButtonEvent;
  560. typedef XButtonEvent XButtonPressedEvent;
  561. typedef XButtonEvent XButtonReleasedEvent;
  562.  
  563. typedef struct {
  564.     int type;        /* of event */
  565.     unsigned long serial;    /* # of last request processed by server */
  566.     Bool send_event;    /* true if this came from a SendEvent request */
  567.     Display *display;    /* Display the event was read from */
  568.     Window window;            /* "event" window reported relative to */
  569.     Window root;            /* root window that the event occured on */
  570.     Window subwindow;    /* child window */
  571.     Time time;        /* milliseconds */
  572.     int x, y;        /* pointer x, y coordinates in event window */
  573.     int x_root, y_root;    /* coordinates relative to root */
  574.     unsigned int state;    /* key or button mask */
  575.     char is_hint;        /* detail */
  576.     Bool same_screen;    /* same screen flag */
  577. } XMotionEvent;
  578. typedef XMotionEvent XPointerMovedEvent;
  579.  
  580. typedef struct {
  581.     int type;        /* of event */
  582.     unsigned long serial;    /* # of last request processed by server */
  583.     Bool send_event;    /* true if this came from a SendEvent request */
  584.     Display *display;    /* Display the event was read from */
  585.     Window window;            /* "event" window reported relative to */
  586.     Window root;            /* root window that the event occured on */
  587.     Window subwindow;    /* child window */
  588.     Time time;        /* milliseconds */
  589.     int x, y;        /* pointer x, y coordinates in event window */
  590.     int x_root, y_root;    /* coordinates relative to root */
  591.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  592.     int detail;
  593.     /*
  594.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  595.      * NotifyNonlinear,NotifyNonlinearVirtual
  596.      */
  597.     Bool same_screen;    /* same screen flag */
  598.     Bool focus;        /* boolean focus */
  599.     unsigned int state;    /* key or button mask */
  600. } XCrossingEvent;
  601. typedef XCrossingEvent XEnterWindowEvent;
  602. typedef XCrossingEvent XLeaveWindowEvent;
  603.  
  604. typedef struct {
  605.     int type;        /* FocusIn or FocusOut */
  606.     unsigned long serial;    /* # of last request processed by server */
  607.     Bool send_event;    /* true if this came from a SendEvent request */
  608.     Display *display;    /* Display the event was read from */
  609.     Window window;        /* window of event */
  610.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  611.     int detail;
  612.     /*
  613.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  614.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  615.      * NotifyPointerRoot, NotifyDetailNone 
  616.      */
  617. } XFocusChangeEvent;
  618. typedef XFocusChangeEvent XFocusInEvent;
  619. typedef XFocusChangeEvent XFocusOutEvent;
  620.  
  621. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  622. typedef struct {
  623.     int type;
  624.     unsigned long serial;    /* # of last request processed by server */
  625.     Bool send_event;    /* true if this came from a SendEvent request */
  626.     Display *display;    /* Display the event was read from */
  627.     Window window;
  628.     char key_vector[32];
  629. } XKeymapEvent;    
  630.  
  631. typedef struct {
  632.     int type;
  633.     unsigned long serial;    /* # of last request processed by server */
  634.     Bool send_event;    /* true if this came from a SendEvent request */
  635.     Display *display;    /* Display the event was read from */
  636.     Window window;
  637.     int x, y;
  638.     int width, height;
  639.     int count;        /* if non-zero, at least this many more */
  640. } XExposeEvent;
  641.  
  642. typedef struct {
  643.     int type;
  644.     unsigned long serial;    /* # of last request processed by server */
  645.     Bool send_event;    /* true if this came from a SendEvent request */
  646.     Display *display;    /* Display the event was read from */
  647.     Drawable drawable;
  648.     int x, y;
  649.     int width, height;
  650.     int count;        /* if non-zero, at least this many more */
  651.     int major_code;        /* core is CopyArea or CopyPlane */
  652.     int minor_code;        /* not defined in the core */
  653. } XGraphicsExposeEvent;
  654.  
  655. typedef struct {
  656.     int type;
  657.     unsigned long serial;    /* # of last request processed by server */
  658.     Bool send_event;    /* true if this came from a SendEvent request */
  659.     Display *display;    /* Display the event was read from */
  660.     Drawable drawable;
  661.     int major_code;        /* core is CopyArea or CopyPlane */
  662.     int minor_code;        /* not defined in the core */
  663. } XNoExposeEvent;
  664.  
  665. typedef struct {
  666.     int type;
  667.     unsigned long serial;    /* # of last request processed by server */
  668.     Bool send_event;    /* true if this came from a SendEvent request */
  669.     Display *display;    /* Display the event was read from */
  670.     Window window;
  671.     int state;        /* Visibility state */
  672. } XVisibilityEvent;
  673.  
  674. typedef struct {
  675.     int type;
  676.     unsigned long serial;    /* # of last request processed by server */
  677.     Bool send_event;    /* true if this came from a SendEvent request */
  678.     Display *display;    /* Display the event was read from */
  679.     Window parent;        /* parent of the window */
  680.     Window window;        /* window id of window created */
  681.     int x, y;        /* window location */
  682.     int width, height;    /* size of window */
  683.     int border_width;    /* border width */
  684.     Bool override_redirect;    /* creation should be overridden */
  685. } XCreateWindowEvent;
  686.  
  687. typedef struct {
  688.     int type;
  689.     unsigned long serial;    /* # of last request processed by server */
  690.     Bool send_event;    /* true if this came from a SendEvent request */
  691.     Display *display;    /* Display the event was read from */
  692.     Window event;
  693.     Window window;
  694. } XDestroyWindowEvent;
  695.  
  696. typedef struct {
  697.     int type;
  698.     unsigned long serial;    /* # of last request processed by server */
  699.     Bool send_event;    /* true if this came from a SendEvent request */
  700.     Display *display;    /* Display the event was read from */
  701.     Window event;
  702.     Window window;
  703.     Bool from_configure;
  704. } XUnmapEvent;
  705.  
  706. typedef struct {
  707.     int type;
  708.     unsigned long serial;    /* # of last request processed by server */
  709.     Bool send_event;    /* true if this came from a SendEvent request */
  710.     Display *display;    /* Display the event was read from */
  711.     Window event;
  712.     Window window;
  713.     Bool override_redirect;    /* boolean, is override set... */
  714. } XMapEvent;
  715.  
  716. typedef struct {
  717.     int type;
  718.     unsigned long serial;    /* # of last request processed by server */
  719.     Bool send_event;    /* true if this came from a SendEvent request */
  720.     Display *display;    /* Display the event was read from */
  721.     Window parent;
  722.     Window window;
  723. } XMapRequestEvent;
  724.  
  725. typedef struct {
  726.     int type;
  727.     unsigned long serial;    /* # of last request processed by server */
  728.     Bool send_event;    /* true if this came from a SendEvent request */
  729.     Display *display;    /* Display the event was read from */
  730.     Window event;
  731.     Window window;
  732.     Window parent;
  733.     int x, y;
  734.     Bool override_redirect;
  735. } XReparentEvent;
  736.  
  737. typedef struct {
  738.     int type;
  739.     unsigned long serial;    /* # of last request processed by server */
  740.     Bool send_event;    /* true if this came from a SendEvent request */
  741.     Display *display;    /* Display the event was read from */
  742.     Window event;
  743.     Window window;
  744.     int x, y;
  745.     int width, height;
  746.     int border_width;
  747.     Window above;
  748.     Bool override_redirect;
  749. } XConfigureEvent;
  750.  
  751. typedef struct {
  752.     int type;
  753.     unsigned long serial;    /* # of last request processed by server */
  754.     Bool send_event;    /* true if this came from a SendEvent request */
  755.     Display *display;    /* Display the event was read from */
  756.     Window event;
  757.     Window window;
  758.     int x, y;
  759. } XGravityEvent;
  760.  
  761. typedef struct {
  762.     int type;
  763.     unsigned long serial;    /* # of last request processed by server */
  764.     Bool send_event;    /* true if this came from a SendEvent request */
  765.     Display *display;    /* Display the event was read from */
  766.     Window window;
  767.     int width, height;
  768. } XResizeRequestEvent;
  769.  
  770. typedef struct {
  771.     int type;
  772.     unsigned long serial;    /* # of last request processed by server */
  773.     Bool send_event;    /* true if this came from a SendEvent request */
  774.     Display *display;    /* Display the event was read from */
  775.     Window parent;
  776.     Window window;
  777.     int x, y;
  778.     int width, height;
  779.     int border_width;
  780.     Window above;
  781.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  782.     unsigned long value_mask;
  783. } XConfigureRequestEvent;
  784.  
  785. typedef struct {
  786.     int type;
  787.     unsigned long serial;    /* # of last request processed by server */
  788.     Bool send_event;    /* true if this came from a SendEvent request */
  789.     Display *display;    /* Display the event was read from */
  790.     Window event;
  791.     Window window;
  792.     int place;        /* PlaceOnTop, PlaceOnBottom */
  793. } XCirculateEvent;
  794.  
  795. typedef struct {
  796.     int type;
  797.     unsigned long serial;    /* # of last request processed by server */
  798.     Bool send_event;    /* true if this came from a SendEvent request */
  799.     Display *display;    /* Display the event was read from */
  800.     Window parent;
  801.     Window window;
  802.     int place;        /* PlaceOnTop, PlaceOnBottom */
  803. } XCirculateRequestEvent;
  804.  
  805. typedef struct {
  806.     int type;
  807.     unsigned long serial;    /* # of last request processed by server */
  808.     Bool send_event;    /* true if this came from a SendEvent request */
  809.     Display *display;    /* Display the event was read from */
  810.     Window window;
  811.     Atom atom;
  812.     Time time;
  813.     int state;        /* PropertyNewValue, PropertyDelete */
  814. } XPropertyEvent;
  815.  
  816. typedef struct {
  817.     int type;
  818.     unsigned long serial;    /* # of last request processed by server */
  819.     Bool send_event;    /* true if this came from a SendEvent request */
  820.     Display *display;    /* Display the event was read from */
  821.     Window window;
  822.     Atom selection;
  823.     Time time;
  824. } XSelectionClearEvent;
  825.  
  826. typedef struct {
  827.     int type;
  828.     unsigned long serial;    /* # of last request processed by server */
  829.     Bool send_event;    /* true if this came from a SendEvent request */
  830.     Display *display;    /* Display the event was read from */
  831.     Window owner;
  832.     Window requestor;
  833.     Atom selection;
  834.     Atom target;
  835.     Atom property;
  836.     Time time;
  837. } XSelectionRequestEvent;
  838.  
  839. typedef struct {
  840.     int type;
  841.     unsigned long serial;    /* # of last request processed by server */
  842.     Bool send_event;    /* true if this came from a SendEvent request */
  843.     Display *display;    /* Display the event was read from */
  844.     Window requestor;
  845.     Atom selection;
  846.     Atom target;
  847.     Atom property;        /* ATOM or None */
  848.     Time time;
  849. } XSelectionEvent;
  850.  
  851. typedef struct {
  852.     int type;
  853.     unsigned long serial;    /* # of last request processed by server */
  854.     Bool send_event;    /* true if this came from a SendEvent request */
  855.     Display *display;    /* Display the event was read from */
  856.     Window window;
  857.     Colormap colormap;    /* COLORMAP or None */
  858. #if defined(__cplusplus) || defined(c_plusplus)
  859.     Bool c_new;        /* C++ */
  860. #else
  861.     Bool new;
  862. #endif
  863.     int state;        /* ColormapInstalled, ColormapUninstalled */
  864. } XColormapEvent;
  865.  
  866. typedef struct {
  867.     int type;
  868.     unsigned long serial;    /* # of last request processed by server */
  869.     Bool send_event;    /* true if this came from a SendEvent request */
  870.     Display *display;    /* Display the event was read from */
  871.     Window window;
  872.     Atom message_type;
  873.     int format;
  874.     union {
  875.         char b[20];
  876.         short s[10];
  877.         long l[5];
  878.         } data;
  879. } XClientMessageEvent;
  880.  
  881. typedef struct {
  882.     int type;
  883.     unsigned long serial;    /* # of last request processed by server */
  884.     Bool send_event;    /* true if this came from a SendEvent request */
  885.     Display *display;    /* Display the event was read from */
  886.     Window window;        /* unused */
  887.     int request;        /* one of MappingModifier, MappingKeyboard,
  888.                    MappingPointer */
  889.     int first_keycode;    /* first keycode */
  890.     int count;        /* defines range of change w. first_keycode*/
  891. } XMappingEvent;
  892.  
  893. typedef struct {
  894.     int type;
  895.     Display *display;    /* Display the event was read from */
  896.     XID resourceid;        /* resource id */
  897.     unsigned long serial;    /* serial number of failed request */
  898.     unsigned char error_code;    /* error code of failed request */
  899.     unsigned char request_code;    /* Major op-code of failed request */
  900.     unsigned char minor_code;    /* Minor op-code of failed request */
  901. } XErrorEvent;
  902.  
  903. typedef struct {
  904.     int type;
  905.     unsigned long serial;    /* # of last request processed by server */
  906.     Bool send_event;    /* true if this came from a SendEvent request */
  907.     Display *display;/* Display the event was read from */
  908.     Window window;    /* window on which event was requested in event mask */
  909. } XAnyEvent;
  910.  
  911. /*
  912.  * this union is defined so Xlib can always use the same sized
  913.  * event structure internally, to avoid memory fragmentation.
  914.  */
  915. typedef union _XEvent {
  916.         int type;        /* must not be changed; first element */
  917.     XAnyEvent xany;
  918.     XKeyEvent xkey;
  919.     XButtonEvent xbutton;
  920.     XMotionEvent xmotion;
  921.     XCrossingEvent xcrossing;
  922.     XFocusChangeEvent xfocus;
  923.     XExposeEvent xexpose;
  924.     XGraphicsExposeEvent xgraphicsexpose;
  925.     XNoExposeEvent xnoexpose;
  926.     XVisibilityEvent xvisibility;
  927.     XCreateWindowEvent xcreatewindow;
  928.     XDestroyWindowEvent xdestroywindow;
  929.     XUnmapEvent xunmap;
  930.     XMapEvent xmap;
  931.     XMapRequestEvent xmaprequest;
  932.     XReparentEvent xreparent;
  933.     XConfigureEvent xconfigure;
  934.     XGravityEvent xgravity;
  935.     XResizeRequestEvent xresizerequest;
  936.     XConfigureRequestEvent xconfigurerequest;
  937.     XCirculateEvent xcirculate;
  938.     XCirculateRequestEvent xcirculaterequest;
  939.     XPropertyEvent xproperty;
  940.     XSelectionClearEvent xselectionclear;
  941.     XSelectionRequestEvent xselectionrequest;
  942.     XSelectionEvent xselection;
  943.     XColormapEvent xcolormap;
  944.     XClientMessageEvent xclient;
  945.     XMappingEvent xmapping;
  946.     XErrorEvent xerror;
  947.     XKeymapEvent xkeymap;
  948.     long pad[24];
  949. } XEvent;
  950. #endif
  951.  
  952. #define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
  953.  
  954. /*
  955.  * per character font metric information.
  956.  */
  957. typedef struct {
  958.     short    lbearing;    /* origin to left edge of raster */
  959.     short    rbearing;    /* origin to right edge of raster */
  960.     short    width;        /* advance to next char's origin */
  961.     short    ascent;        /* baseline to top edge of raster */
  962.     short    descent;    /* baseline to bottom edge of raster */
  963.     unsigned short attributes;    /* per char flags (not predefined) */
  964. } XCharStruct;
  965.  
  966. /*
  967.  * To allow arbitrary information with fonts, there are additional properties
  968.  * returned.
  969.  */
  970. typedef struct {
  971.     Atom name;
  972.     unsigned long card32;
  973. } XFontProp;
  974.  
  975. typedef struct {
  976.     XExtData    *ext_data;    /* hook for extension to hang data */
  977.     Font        fid;            /* Font id for this font */
  978.     unsigned    direction;    /* hint about direction the font is painted */
  979.     unsigned    min_char_or_byte2;/* first character */
  980.     unsigned    max_char_or_byte2;/* last character */
  981.     unsigned    min_byte1;    /* first row that exists */
  982.     unsigned    max_byte1;    /* last row that exists */
  983.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  984.     unsigned    default_char;    /* char to print for undefined character */
  985.     int         n_properties;   /* how many properties there are */
  986.     XFontProp    *properties;    /* pointer to array of additional properties*/
  987.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  988.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  989.     XCharStruct    *per_char;    /* first_char to last_char information */
  990.     int        ascent;        /* log. extent above baseline for spacing */
  991.     int        descent;    /* log. descent below baseline for spacing */
  992. } XFontStruct;
  993.  
  994. /*
  995.  * PolyText routines take these as arguments.
  996.  */
  997. typedef struct {
  998.     char *chars;        /* pointer to string */
  999.     int nchars;            /* number of characters */
  1000.     int delta;            /* delta between strings */
  1001.     Font font;            /* font to print it in, None don't change */
  1002. } XTextItem;
  1003.  
  1004. typedef struct {        /* normal 16 bit characters are two bytes */
  1005.     unsigned char byte1;
  1006.     unsigned char byte2;
  1007. } XChar2b;
  1008.  
  1009. typedef struct {
  1010.     XChar2b *chars;        /* two byte characters */
  1011.     int nchars;            /* number of characters */
  1012.     int delta;            /* delta between strings */
  1013.     Font font;            /* font to print it in, None don't change */
  1014. } XTextItem16;
  1015.  
  1016.  
  1017. typedef union { Display *display;
  1018.         GC gc;
  1019.         Visual *visual;
  1020.         Screen *screen;
  1021.         ScreenFormat *pixmap_format;
  1022.         XFontStruct *font; } XEDataObject;
  1023.  
  1024. typedef struct {
  1025.     XRectangle      max_ink_extent;
  1026.     XRectangle      max_logical_extent;
  1027. } XFontSetExtents;
  1028.  
  1029. typedef struct _XFontSet *XFontSet;
  1030.  
  1031. typedef struct {
  1032.     char           *chars;
  1033.     int             nchars;
  1034.     int             delta;
  1035.     XFontSet        font_set;
  1036. } XmbTextItem;
  1037.  
  1038. typedef struct {
  1039.     wchar_t        *chars;
  1040.     int             nchars;
  1041.     int             delta;
  1042.     XFontSet        font_set;
  1043. } XwcTextItem;
  1044.  
  1045. typedef void (*XIMProc)();
  1046.  
  1047. typedef struct _XIM *XIM;
  1048. typedef struct _XIC *XIC;
  1049.  
  1050. typedef unsigned long XIMStyle;
  1051.  
  1052. typedef struct {
  1053.     unsigned short count_styles;
  1054.     XIMStyle *supported_styles;
  1055. } XIMStyles;
  1056.  
  1057. #define XIMPreeditArea        0x0001L
  1058. #define XIMPreeditCallbacks    0x0002L
  1059. #define XIMPreeditPosition    0x0004L
  1060. #define XIMPreeditNothing    0x0008L
  1061. #define XIMPreeditNone        0x0010L
  1062. #define XIMStatusArea        0x0100L
  1063. #define XIMStatusCallbacks    0x0200L
  1064. #define XIMStatusNothing    0x0400L
  1065. #define XIMStatusNone        0x0800L
  1066.  
  1067. #define XNVaNestedList "XNVaNestedList"
  1068. #define XNQueryInputStyle "queryInputStyle"
  1069. #define XNClientWindow "clientWindow"
  1070. #define XNInputStyle "inputStyle"
  1071. #define XNFocusWindow "focusWindow"
  1072. #define XNResourceName "resourceName"
  1073. #define XNResourceClass "resourceClass"
  1074. #define XNGeometryCallback "geometryCallback"
  1075. #define XNFilterEvents "filterEvents"
  1076. #define XNPreeditStartCallback "preeditStartCallback"
  1077. #define XNPreeditDoneCallback "preeditDoneCallback"
  1078. #define XNPreeditDrawCallback "preeditDrawCallback"
  1079. #define XNPreeditCaretCallback "preeditCaretCallback"
  1080. #define XNPreeditAttributes "preeditAttributes"
  1081. #define XNStatusStartCallback "statusStartCallback"
  1082. #define XNStatusDoneCallback "statusDoneCallback"
  1083. #define XNStatusDrawCallback "statusDrawCallback"
  1084. #define XNStatusAttributes "statusAttributes"
  1085. #define XNArea "area"
  1086. #define XNAreaNeeded "areaNeeded"
  1087. #define XNSpotLocation "spotLocation"
  1088. #define XNColormap "colorMap"
  1089. #define XNStdColormap "stdColorMap"
  1090. #define XNForeground "foreground"
  1091. #define XNBackground "background"
  1092. #define XNBackgroundPixmap "backgroundPixmap"
  1093. #define XNFontSet "fontSet"
  1094. #define XNLineSpace "lineSpace"
  1095. #define XNCursor "cursor"
  1096.  
  1097. #define XBufferOverflow        -1
  1098. #define XLookupNone        1
  1099. #define XLookupChars        2
  1100. #define XLookupKeySym        3
  1101. #define XLookupBoth        4
  1102.  
  1103. #if NeedFunctionPrototypes
  1104. typedef void *XVaNestedList;
  1105. #else
  1106. typedef XPointer XVaNestedList;
  1107. #endif
  1108.  
  1109. typedef struct {
  1110.     XPointer client_data;
  1111.     XIMProc callback;
  1112. } XIMCallback;
  1113.  
  1114. typedef unsigned long XIMFeedback;
  1115.  
  1116. #define XIMReverse    1
  1117. #define XIMUnderline    (1<<1) 
  1118. #define XIMHighlight    (1<<2)
  1119. #define XIMPrimary     (1<<5)
  1120. #define XIMSecondary    (1<<6)
  1121. #define XIMTertiary     (1<<7)
  1122.  
  1123. typedef struct _XIMText {
  1124.     unsigned short length;
  1125.     XIMFeedback *feedback;
  1126.     Bool encoding_is_wchar; 
  1127.     union {
  1128.     char *multi_byte;
  1129.     wchar_t *wide_char;
  1130.     } string; 
  1131. } XIMText;
  1132.  
  1133. typedef struct _XIMPreeditDrawCallbackStruct {
  1134.     int caret;        /* Cursor offset within pre-edit string */
  1135.     int chg_first;    /* Starting change position */
  1136.     int chg_length;    /* Length of the change in character count */
  1137.     XIMText *text;
  1138. } XIMPreeditDrawCallbackStruct;
  1139.  
  1140. typedef enum {
  1141.     XIMForwardChar, XIMBackwardChar,
  1142.     XIMForwardWord, XIMBackwardWord,
  1143.     XIMCaretUp, XIMCaretDown,
  1144.     XIMNextLine, XIMPreviousLine,
  1145.     XIMLineStart, XIMLineEnd, 
  1146.     XIMAbsolutePosition,
  1147.     XIMDontChange
  1148. } XIMCaretDirection;
  1149.  
  1150. typedef enum {
  1151.     XIMIsInvisible,    /* Disable caret feedback */ 
  1152.     XIMIsPrimary,    /* UI defined caret feedback */
  1153.     XIMIsSecondary    /* UI defined caret feedback */
  1154. } XIMCaretStyle;
  1155.  
  1156. typedef struct _XIMPreeditCaretCallbackStruct {
  1157.     int position;         /* Caret offset within pre-edit string */
  1158.     XIMCaretDirection direction; /* Caret moves direction */
  1159.     XIMCaretStyle style;     /* Feedback of the caret */
  1160. } XIMPreeditCaretCallbackStruct;
  1161.  
  1162. typedef enum {
  1163.     XIMTextType,
  1164.     XIMBitmapType
  1165. } XIMStatusDataType;
  1166.     
  1167. typedef struct _XIMStatusDrawCallbackStruct {
  1168.     XIMStatusDataType type;
  1169.     union {
  1170.     XIMText *text;
  1171.     Pixmap  bitmap;
  1172.     } data;
  1173. } XIMStatusDrawCallbackStruct;
  1174.  
  1175. _XFUNCPROTOBEGIN
  1176.  
  1177. extern XFontStruct *XLoadQueryFont(
  1178. #if NeedFunctionPrototypes
  1179.     Display*        /* display */,
  1180.     _Xconst char*    /* name */
  1181. #endif
  1182. );
  1183.  
  1184. extern XFontStruct *XQueryFont(
  1185. #if NeedFunctionPrototypes
  1186.     Display*        /* display */,
  1187.     XID            /* font_ID */
  1188. #endif
  1189. );
  1190.  
  1191.  
  1192. extern XTimeCoord *XGetMotionEvents(
  1193. #if NeedFunctionPrototypes
  1194.     Display*        /* display */,
  1195.     Window        /* w */,
  1196.     Time        /* start */,
  1197.     Time        /* stop */,
  1198.     int*        /* nevents_return */
  1199. #endif
  1200. );
  1201.  
  1202. extern XModifierKeymap *XDeleteModifiermapEntry(
  1203. #if NeedFunctionPrototypes
  1204.     XModifierKeymap*    /* modmap */,
  1205. #if NeedWidePrototypes
  1206.     unsigned int    /* keycode_entry */,
  1207. #else
  1208.     KeyCode        /* keycode_entry */,
  1209. #endif
  1210.     int            /* modifier */
  1211. #endif
  1212. );
  1213.  
  1214. extern XModifierKeymap    *XGetModifierMapping(
  1215. #if NeedFunctionPrototypes
  1216.     Display*        /* display */
  1217. #endif
  1218. );
  1219.  
  1220. extern XModifierKeymap    *XInsertModifiermapEntry(
  1221. #if NeedFunctionPrototypes
  1222.     XModifierKeymap*    /* modmap */,
  1223. #if NeedWidePrototypes
  1224.     unsigned int    /* keycode_entry */,
  1225. #else
  1226.     KeyCode        /* keycode_entry */,
  1227. #endif
  1228.     int            /* modifier */    
  1229. #endif
  1230. );
  1231.  
  1232. extern XModifierKeymap *XNewModifiermap(
  1233. #if NeedFunctionPrototypes
  1234.     int            /* max_keys_per_mod */
  1235. #endif
  1236. );
  1237.  
  1238. extern XImage *XCreateImage(
  1239. #if NeedFunctionPrototypes
  1240.     Display*        /* display */,
  1241.     Visual*        /* visual */,
  1242.     unsigned int    /* depth */,
  1243.     int            /* format */,
  1244.     int            /* offset */,
  1245.     char*        /* data */,
  1246.     unsigned int    /* width */,
  1247.     unsigned int    /* height */,
  1248.     int            /* bitmap_pad */,
  1249.     int            /* bytes_per_line */
  1250. #endif
  1251. );
  1252. extern XImage *XGetImage(
  1253. #if NeedFunctionPrototypes
  1254.     Display*        /* display */,
  1255.     Drawable        /* d */,
  1256.     int            /* x */,
  1257.     int            /* y */,
  1258.     unsigned int    /* width */,
  1259.     unsigned int    /* height */,
  1260.     unsigned long    /* plane_mask */,
  1261.     int            /* format */
  1262. #endif
  1263. );
  1264. extern XImage *XGetSubImage(
  1265. #if NeedFunctionPrototypes
  1266.     Display*        /* display */,
  1267.     Drawable        /* d */,
  1268.     int            /* x */,
  1269.     int            /* y */,
  1270.     unsigned int    /* width */,
  1271.     unsigned int    /* height */,
  1272.     unsigned long    /* plane_mask */,
  1273.     int            /* format */,
  1274.     XImage*        /* dest_image */,
  1275.     int            /* dest_x */,
  1276.     int            /* dest_y */
  1277. #endif
  1278. );
  1279.  
  1280. /* 
  1281.  * X function declarations.
  1282.  */
  1283. extern Display *XOpenDisplay(
  1284. #if NeedFunctionPrototypes
  1285.     _Xconst char*    /* display_name */
  1286. #endif
  1287. );
  1288.  
  1289. extern void XrmInitialize(
  1290. #if NeedFunctionPrototypes
  1291.     void
  1292. #endif
  1293. );
  1294.  
  1295. extern char *XFetchBytes(
  1296. #if NeedFunctionPrototypes
  1297.     Display*        /* display */,
  1298.     int*        /* nbytes_return */
  1299. #endif
  1300. );
  1301. extern char *XFetchBuffer(
  1302. #if NeedFunctionPrototypes
  1303.     Display*        /* display */,
  1304.     int*        /* nbytes_return */,
  1305.     int            /* buffer */
  1306. #endif
  1307. );
  1308. extern char *XGetAtomName(
  1309. #if NeedFunctionPrototypes
  1310.     Display*        /* display */,
  1311.     Atom        /* atom */
  1312. #endif
  1313. );
  1314. extern char *XGetDefault(
  1315. #if NeedFunctionPrototypes
  1316.     Display*        /* display */,
  1317.     _Xconst char*    /* program */,
  1318.     _Xconst char*    /* option */          
  1319. #endif
  1320. );
  1321. extern char *XDisplayName(
  1322. #if NeedFunctionPrototypes
  1323.     _Xconst char*    /* string */
  1324. #endif
  1325. );
  1326. extern char *XKeysymToString(
  1327. #if NeedFunctionPrototypes
  1328.     KeySym        /* keysym */
  1329. #endif
  1330. );
  1331.  
  1332. extern int (*XSynchronize(
  1333. #if NeedFunctionPrototypes
  1334.     Display*        /* display */,
  1335.     Bool        /* onoff */
  1336. #endif
  1337. ))();
  1338. extern int (*XSetAfterFunction(
  1339. #if NeedFunctionPrototypes
  1340.     Display*        /* display */,
  1341.     int (*) (
  1342. #if NeedNestedPrototypes
  1343.          Display*    /* display */
  1344. #endif
  1345.             )        /* procedure */
  1346. #endif
  1347. ))();
  1348. extern Atom XInternAtom(
  1349. #if NeedFunctionPrototypes
  1350.     Display*        /* display */,
  1351.     _Xconst char*    /* atom_name */,
  1352.     Bool        /* only_if_exists */         
  1353. #endif
  1354. );
  1355. extern Colormap XCopyColormapAndFree(
  1356. #if NeedFunctionPrototypes
  1357.     Display*        /* display */,
  1358.     Colormap        /* colormap */
  1359. #endif
  1360. );
  1361. extern Colormap XCreateColormap(
  1362. #if NeedFunctionPrototypes
  1363.     Display*        /* display */,
  1364.     Window        /* w */,
  1365.     Visual*        /* visual */,
  1366.     int            /* alloc */             
  1367. #endif
  1368. );
  1369. extern Cursor XCreatePixmapCursor(
  1370. #if NeedFunctionPrototypes
  1371.     Display*        /* display */,
  1372.     Pixmap        /* source */,
  1373.     Pixmap        /* mask */,
  1374.     XColor*        /* foreground_color */,
  1375.     XColor*        /* background_color */,
  1376.     unsigned int    /* x */,
  1377.     unsigned int    /* y */               
  1378. #endif
  1379. );
  1380. extern Cursor XCreateGlyphCursor(
  1381. #if NeedFunctionPrototypes
  1382.     Display*        /* display */,
  1383.     Font        /* source_font */,
  1384.     Font        /* mask_font */,
  1385.     unsigned int    /* source_char */,
  1386.     unsigned int    /* mask_char */,
  1387.     XColor*        /* foreground_color */,
  1388.     XColor*        /* background_color */
  1389. #endif
  1390. );
  1391. extern Cursor XCreateFontCursor(
  1392. #if NeedFunctionPrototypes
  1393.     Display*        /* display */,
  1394.     unsigned int    /* shape */
  1395. #endif
  1396. );
  1397. extern Font XLoadFont(
  1398. #if NeedFunctionPrototypes
  1399.     Display*        /* display */,
  1400.     _Xconst char*    /* name */
  1401. #endif
  1402. );
  1403. extern GC XCreateGC(
  1404. #if NeedFunctionPrototypes
  1405.     Display*        /* display */,
  1406.     Drawable        /* d */,
  1407.     unsigned long    /* valuemask */,
  1408.     XGCValues*        /* values */
  1409. #endif
  1410. );
  1411. extern GContext XGContextFromGC(
  1412. #if NeedFunctionPrototypes
  1413.     GC            /* gc */
  1414. #endif
  1415. );
  1416. extern void XFlushGC(
  1417. #if NeedFunctionPrototypes
  1418.     Display*        /* display */,
  1419.     GC            /* gc */
  1420. #endif
  1421. );
  1422. extern Pixmap XCreatePixmap(
  1423. #if NeedFunctionPrototypes
  1424.     Display*        /* display */,
  1425.     Drawable        /* d */,
  1426.     unsigned int    /* width */,
  1427.     unsigned int    /* height */,
  1428.     unsigned int    /* depth */                
  1429. #endif
  1430. );
  1431. extern Pixmap XCreateBitmapFromData(
  1432. #if NeedFunctionPrototypes
  1433.     Display*        /* display */,
  1434.     Drawable        /* d */,
  1435.     _Xconst char*    /* data */,
  1436.     unsigned int    /* width */,
  1437.     unsigned int    /* height */
  1438. #endif
  1439. );
  1440. extern Pixmap XCreatePixmapFromBitmapData(
  1441. #if NeedFunctionPrototypes
  1442.     Display*        /* display */,
  1443.     Drawable        /* d */,
  1444.     char*        /* data */,
  1445.     unsigned int    /* width */,
  1446.     unsigned int    /* height */,
  1447.     unsigned long    /* fg */,
  1448.     unsigned long    /* bg */,
  1449.     unsigned int    /* depth */
  1450. #endif
  1451. );
  1452. extern Window XCreateSimpleWindow(
  1453. #if NeedFunctionPrototypes
  1454.     Display*        /* display */,
  1455.     Window        /* parent */,
  1456.     int            /* x */,
  1457.     int            /* y */,
  1458.     unsigned int    /* width */,
  1459.     unsigned int    /* height */,
  1460.     unsigned int    /* border_width */,
  1461.     unsigned long    /* border */,
  1462.     unsigned long    /* background */
  1463. #endif
  1464. );
  1465. extern Window XGetSelectionOwner(
  1466. #if NeedFunctionPrototypes
  1467.     Display*        /* display */,
  1468.     Atom        /* selection */
  1469. #endif
  1470. );
  1471. extern Window XCreateWindow(
  1472. #if NeedFunctionPrototypes
  1473.     Display*        /* display */,
  1474.     Window        /* parent */,
  1475.     int            /* x */,
  1476.     int            /* y */,
  1477.     unsigned int    /* width */,
  1478.     unsigned int    /* height */,
  1479.     unsigned int    /* border_width */,
  1480.     int            /* depth */,
  1481.     unsigned int    /* class */,
  1482.     Visual*        /* visual */,
  1483.     unsigned long    /* valuemask */,
  1484.     XSetWindowAttributes*    /* attributes */
  1485. #endif
  1486. ); 
  1487. extern Colormap *XListInstalledColormaps(
  1488. #if NeedFunctionPrototypes
  1489.     Display*        /* display */,
  1490.     Window        /* w */,
  1491.     int*        /* num_return */
  1492. #endif
  1493. );
  1494. extern char **XListFonts(
  1495. #if NeedFunctionPrototypes
  1496.     Display*        /* display */,
  1497.     _Xconst char*    /* pattern */,
  1498.     int            /* maxnames */,
  1499.     int*        /* actual_count_return */
  1500. #endif
  1501. );
  1502. extern char **XListFontsWithInfo(
  1503. #if NeedFunctionPrototypes
  1504.     Display*        /* display */,
  1505.     _Xconst char*    /* pattern */,
  1506.     int            /* maxnames */,
  1507.     int*        /* count_return */,
  1508.     XFontStruct**    /* info_return */
  1509. #endif
  1510. );
  1511. extern char **XGetFontPath(
  1512. #if NeedFunctionPrototypes
  1513.     Display*        /* display */,
  1514.     int*        /* npaths_return */
  1515. #endif
  1516. );
  1517. extern char **XListExtensions(
  1518. #if NeedFunctionPrototypes
  1519.     Display*        /* display */,
  1520.     int*        /* nextensions_return */
  1521. #endif
  1522. );
  1523. extern Atom *XListProperties(
  1524. #if NeedFunctionPrototypes
  1525.     Display*        /* display */,
  1526.     Window        /* w */,
  1527.     int*        /* num_prop_return */
  1528. #endif
  1529. );
  1530. extern XHostAddress *XListHosts(
  1531. #if NeedFunctionPrototypes
  1532.     Display*        /* display */,
  1533.     int*        /* nhosts_return */,
  1534.     Bool*        /* state_return */
  1535. #endif
  1536. );
  1537. extern KeySym XKeycodeToKeysym(
  1538. #if NeedFunctionPrototypes
  1539.     Display*        /* display */,
  1540. #if NeedWidePrototypes
  1541.     unsigned int    /* keycode */,
  1542. #else
  1543.     KeyCode        /* keycode */,
  1544. #endif
  1545.     int            /* index */
  1546. #endif
  1547. );
  1548. extern KeySym XLookupKeysym(
  1549. #if NeedFunctionPrototypes
  1550.     XKeyEvent*        /* key_event */,
  1551.     int            /* index */
  1552. #endif
  1553. );
  1554. extern KeySym *XGetKeyboardMapping(
  1555. #if NeedFunctionPrototypes
  1556.     Display*        /* display */,
  1557. #if NeedWidePrototypes
  1558.     unsigned int    /* first_keycode */,
  1559. #else
  1560.     KeyCode        /* first_keycode */,
  1561. #endif
  1562.     int            /* keycode_count */,
  1563.     int*        /* keysyms_per_keycode_return */
  1564. #endif
  1565. );
  1566. extern KeySym XStringToKeysym(
  1567. #if NeedFunctionPrototypes
  1568.     _Xconst char*    /* string */
  1569. #endif
  1570. );
  1571. extern long XMaxRequestSize(
  1572. #if NeedFunctionPrototypes
  1573.     Display*        /* display */
  1574. #endif
  1575. );
  1576. extern long XExtendedMaxRequestSize(
  1577. #if NeedFunctionPrototypes
  1578.     Display*        /* display */
  1579. #endif
  1580. );
  1581. extern char *XResourceManagerString(
  1582. #if NeedFunctionPrototypes
  1583.     Display*        /* display */
  1584. #endif
  1585. );
  1586. extern char *XScreenResourceString(
  1587. #if NeedFunctionPrototypes
  1588.     Screen*        /* screen */
  1589. #endif
  1590. );
  1591. extern unsigned long XDisplayMotionBufferSize(
  1592. #if NeedFunctionPrototypes
  1593.     Display*        /* display */
  1594. #endif
  1595. );
  1596. extern VisualID XVisualIDFromVisual(
  1597. #if NeedFunctionPrototypes
  1598.     Visual*        /* visual */
  1599. #endif
  1600. );
  1601.  
  1602. /* routines for dealing with extensions */
  1603.  
  1604. extern XExtCodes *XInitExtension(
  1605. #if NeedFunctionPrototypes
  1606.     Display*        /* display */,
  1607.     _Xconst char*    /* name */
  1608. #endif
  1609. );
  1610.  
  1611. extern XExtCodes *XAddExtension(
  1612. #if NeedFunctionPrototypes
  1613.     Display*        /* display */
  1614. #endif
  1615. );
  1616. extern XExtData *XFindOnExtensionList(
  1617. #if NeedFunctionPrototypes
  1618.     XExtData**        /* structure */,
  1619.     int            /* number */
  1620. #endif
  1621. );
  1622. extern XExtData **XEHeadOfExtensionList(
  1623. #if NeedFunctionPrototypes
  1624.     XEDataObject    /* object */
  1625. #endif
  1626. );
  1627.  
  1628. /* these are routines for which there are also macros */
  1629. extern Window XRootWindow(
  1630. #if NeedFunctionPrototypes
  1631.     Display*        /* display */,
  1632.     int            /* screen_number */
  1633. #endif
  1634. );
  1635. extern Window XDefaultRootWindow(
  1636. #if NeedFunctionPrototypes
  1637.     Display*        /* display */
  1638. #endif
  1639. );
  1640. extern Window XRootWindowOfScreen(
  1641. #if NeedFunctionPrototypes
  1642.     Screen*        /* screen */
  1643. #endif
  1644. );
  1645. extern Visual *XDefaultVisual(
  1646. #if NeedFunctionPrototypes
  1647.     Display*        /* display */,
  1648.     int            /* screen_number */
  1649. #endif
  1650. );
  1651. extern Visual *XDefaultVisualOfScreen(
  1652. #if NeedFunctionPrototypes
  1653.     Screen*        /* screen */
  1654. #endif
  1655. );
  1656. extern GC XDefaultGC(
  1657. #if NeedFunctionPrototypes
  1658.     Display*        /* display */,
  1659.     int            /* screen_number */
  1660. #endif
  1661. );
  1662. extern GC XDefaultGCOfScreen(
  1663. #if NeedFunctionPrototypes
  1664.     Screen*        /* screen */
  1665. #endif
  1666. );
  1667. extern unsigned long XBlackPixel(
  1668. #if NeedFunctionPrototypes
  1669.     Display*        /* display */,
  1670.     int            /* screen_number */
  1671. #endif
  1672. );
  1673. extern unsigned long XWhitePixel(
  1674. #if NeedFunctionPrototypes
  1675.     Display*        /* display */,
  1676.     int            /* screen_number */
  1677. #endif
  1678. );
  1679. extern unsigned long XAllPlanes(
  1680. #if NeedFunctionPrototypes
  1681.     void
  1682. #endif
  1683. );
  1684. extern unsigned long XBlackPixelOfScreen(
  1685. #if NeedFunctionPrototypes
  1686.     Screen*        /* screen */
  1687. #endif
  1688. );
  1689. extern unsigned long XWhitePixelOfScreen(
  1690. #if NeedFunctionPrototypes
  1691.     Screen*        /* screen */
  1692. #endif
  1693. );
  1694. extern unsigned long XNextRequest(
  1695. #if NeedFunctionPrototypes
  1696.     Display*        /* display */
  1697. #endif
  1698. );
  1699. extern unsigned long XLastKnownRequestProcessed(
  1700. #if NeedFunctionPrototypes
  1701.     Display*        /* display */
  1702. #endif
  1703. );
  1704. extern char *XServerVendor(
  1705. #if NeedFunctionPrototypes
  1706.     Display*        /* display */
  1707. #endif
  1708. );
  1709. extern char *XDisplayString(
  1710. #if NeedFunctionPrototypes
  1711.     Display*        /* display */
  1712. #endif
  1713. );
  1714. extern Colormap XDefaultColormap(
  1715. #if NeedFunctionPrototypes
  1716.     Display*        /* display */,
  1717.     int            /* screen_number */
  1718. #endif
  1719. );
  1720. extern Colormap XDefaultColormapOfScreen(
  1721. #if NeedFunctionPrototypes
  1722.     Screen*        /* screen */
  1723. #endif
  1724. );
  1725. extern Display *XDisplayOfScreen(
  1726. #if NeedFunctionPrototypes
  1727.     Screen*        /* screen */
  1728. #endif
  1729. );
  1730. extern Screen *XScreenOfDisplay(
  1731. #if NeedFunctionPrototypes
  1732.     Display*        /* display */,
  1733.     int            /* screen_number */
  1734. #endif
  1735. );
  1736. extern Screen *XDefaultScreenOfDisplay(
  1737. #if NeedFunctionPrototypes
  1738.     Display*        /* display */
  1739. #endif
  1740. );
  1741. extern long XEventMaskOfScreen(
  1742. #if NeedFunctionPrototypes
  1743.     Screen*        /* screen */
  1744. #endif
  1745. );
  1746.  
  1747. extern int XScreenNumberOfScreen(
  1748. #if NeedFunctionPrototypes
  1749.     Screen*        /* screen */
  1750. #endif
  1751. );
  1752.  
  1753. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1754. #if NeedFunctionPrototypes
  1755.     Display*        /* display */,
  1756.     XErrorEvent*    /* error_event */
  1757. #endif
  1758. );
  1759.  
  1760. extern XErrorHandler XSetErrorHandler (
  1761. #if NeedFunctionPrototypes
  1762.     XErrorHandler    /* handler */
  1763. #endif
  1764. );
  1765.  
  1766.  
  1767. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1768. #if NeedFunctionPrototypes
  1769.     Display*        /* display */
  1770. #endif
  1771. );
  1772.  
  1773. extern XIOErrorHandler XSetIOErrorHandler (
  1774. #if NeedFunctionPrototypes
  1775.     XIOErrorHandler    /* handler */
  1776. #endif
  1777. );
  1778.  
  1779.  
  1780. extern XPixmapFormatValues *XListPixmapFormats(
  1781. #if NeedFunctionPrototypes
  1782.     Display*        /* display */,
  1783.     int*        /* count_return */
  1784. #endif
  1785. );
  1786. extern int *XListDepths(
  1787. #if NeedFunctionPrototypes
  1788.     Display*        /* display */,
  1789.     int            /* screen_number */,
  1790.     int*        /* count_return */
  1791. #endif
  1792. );
  1793.  
  1794. /* ICCCM routines for things that don't require special include files; */
  1795. /* other declarations are given in Xutil.h                             */
  1796. extern Status XReconfigureWMWindow(
  1797. #if NeedFunctionPrototypes
  1798.     Display*        /* display */,
  1799.     Window        /* w */,
  1800.     int            /* screen_number */,
  1801.     unsigned int    /* mask */,
  1802.     XWindowChanges*    /* changes */
  1803. #endif
  1804. );
  1805.  
  1806. extern Status XGetWMProtocols(
  1807. #if NeedFunctionPrototypes
  1808.     Display*        /* display */,
  1809.     Window        /* w */,
  1810.     Atom**        /* protocols_return */,
  1811.     int*        /* count_return */
  1812. #endif
  1813. );
  1814. extern Status XSetWMProtocols(
  1815. #if NeedFunctionPrototypes
  1816.     Display*        /* display */,
  1817.     Window        /* w */,
  1818.     Atom*        /* protocols */,
  1819.     int            /* count */
  1820. #endif
  1821. );
  1822. extern Status XIconifyWindow(
  1823. #if NeedFunctionPrototypes
  1824.     Display*        /* display */,
  1825.     Window        /* w */,
  1826.     int            /* screen_number */
  1827. #endif
  1828. );
  1829. extern Status XWithdrawWindow(
  1830. #if NeedFunctionPrototypes
  1831.     Display*        /* display */,
  1832.     Window        /* w */,
  1833.     int            /* screen_number */
  1834. #endif
  1835. );
  1836. extern Status XGetCommand(
  1837. #if NeedFunctionPrototypes
  1838.     Display*        /* display */,
  1839.     Window        /* w */,
  1840.     char***        /* argv_return */,
  1841.     int*        /* argc_return */
  1842. #endif
  1843. );
  1844. extern Status XGetWMColormapWindows(
  1845. #if NeedFunctionPrototypes
  1846.     Display*        /* display */,
  1847.     Window        /* w */,
  1848.     Window**        /* windows_return */,
  1849.     int*        /* count_return */
  1850. #endif
  1851. );
  1852. extern Status XSetWMColormapWindows(
  1853. #if NeedFunctionPrototypes
  1854.     Display*        /* display */,
  1855.     Window        /* w */,
  1856.     Window*        /* colormap_windows */,
  1857.     int            /* count */
  1858. #endif
  1859. );
  1860. extern void XFreeStringList(
  1861. #if NeedFunctionPrototypes
  1862.     char**        /* list */
  1863. #endif
  1864. );
  1865. extern XSetTransientForHint(
  1866. #if NeedFunctionPrototypes
  1867.     Display*        /* display */,
  1868.     Window        /* w */,
  1869.     Window        /* prop_window */
  1870. #endif
  1871. );
  1872.  
  1873. /* The following are given in alphabetical order */
  1874.  
  1875. extern XActivateScreenSaver(
  1876. #if NeedFunctionPrototypes
  1877.     Display*        /* display */
  1878. #endif
  1879. );
  1880.  
  1881. extern XAddHost(
  1882. #if NeedFunctionPrototypes
  1883.     Display*        /* display */,
  1884.     XHostAddress*    /* host */
  1885. #endif
  1886. );
  1887.  
  1888. extern XAddHosts(
  1889. #if NeedFunctionPrototypes
  1890.     Display*        /* display */,
  1891.     XHostAddress*    /* hosts */,
  1892.     int            /* num_hosts */    
  1893. #endif
  1894. );
  1895.  
  1896. extern XAddToExtensionList(
  1897. #if NeedFunctionPrototypes
  1898.     struct _XExtData**    /* structure */,
  1899.     XExtData*        /* ext_data */
  1900. #endif
  1901. );
  1902.  
  1903. extern XAddToSaveSet(
  1904. #if NeedFunctionPrototypes
  1905.     Display*        /* display */,
  1906.     Window        /* w */
  1907. #endif
  1908. );
  1909.  
  1910. extern Status XAllocColor(
  1911. #if NeedFunctionPrototypes
  1912.     Display*        /* display */,
  1913.     Colormap        /* colormap */,
  1914.     XColor*        /* screen_in_out */
  1915. #endif
  1916. );
  1917.  
  1918. extern Status XAllocColorCells(
  1919. #if NeedFunctionPrototypes
  1920.     Display*        /* display */,
  1921.     Colormap        /* colormap */,
  1922.     Bool            /* contig */,
  1923.     unsigned long*    /* plane_masks_return */,
  1924.     unsigned int    /* nplanes */,
  1925.     unsigned long*    /* pixels_return */,
  1926.     unsigned int     /* npixels */
  1927. #endif
  1928. );
  1929.  
  1930. extern Status XAllocColorPlanes(
  1931. #if NeedFunctionPrototypes
  1932.     Display*        /* display */,
  1933.     Colormap        /* colormap */,
  1934.     Bool        /* contig */,
  1935.     unsigned long*    /* pixels_return */,
  1936.     int            /* ncolors */,
  1937.     int            /* nreds */,
  1938.     int            /* ngreens */,
  1939.     int            /* nblues */,
  1940.     unsigned long*    /* rmask_return */,
  1941.     unsigned long*    /* gmask_return */,
  1942.     unsigned long*    /* bmask_return */
  1943. #endif
  1944. );
  1945.  
  1946. extern Status XAllocNamedColor(
  1947. #if NeedFunctionPrototypes
  1948.     Display*        /* display */,
  1949.     Colormap        /* colormap */,
  1950.     _Xconst char*    /* color_name */,
  1951.     XColor*        /* screen_def_return */,
  1952.     XColor*        /* exact_def_return */
  1953. #endif
  1954. );
  1955.  
  1956. extern XAllowEvents(
  1957. #if NeedFunctionPrototypes
  1958.     Display*        /* display */,
  1959.     int            /* event_mode */,
  1960.     Time        /* time */
  1961. #endif
  1962. );
  1963.  
  1964. extern XAutoRepeatOff(
  1965. #if NeedFunctionPrototypes
  1966.     Display*        /* display */
  1967. #endif
  1968. );
  1969.  
  1970. extern XAutoRepeatOn(
  1971. #if NeedFunctionPrototypes
  1972.     Display*        /* display */
  1973. #endif
  1974. );
  1975.  
  1976. extern XBell(
  1977. #if NeedFunctionPrototypes
  1978.     Display*        /* display */,
  1979.     int            /* percent */
  1980. #endif
  1981. );
  1982.  
  1983. extern int XBitmapBitOrder(
  1984. #if NeedFunctionPrototypes
  1985.     Display*        /* display */
  1986. #endif
  1987. );
  1988.  
  1989. extern int XBitmapPad(
  1990. #if NeedFunctionPrototypes
  1991.     Display*        /* display */
  1992. #endif
  1993. );
  1994.  
  1995. extern int XBitmapUnit(
  1996. #if NeedFunctionPrototypes
  1997.     Display*        /* display */
  1998. #endif
  1999. );
  2000.  
  2001. extern int XCellsOfScreen(
  2002. #if NeedFunctionPrototypes
  2003.     Screen*        /* screen */
  2004. #endif
  2005. );
  2006.  
  2007. extern XChangeActivePointerGrab(
  2008. #if NeedFunctionPrototypes
  2009.     Display*        /* display */,
  2010.     unsigned int    /* event_mask */,
  2011.     Cursor        /* cursor */,
  2012.     Time        /* time */
  2013. #endif
  2014. );
  2015.  
  2016. extern XChangeGC(
  2017. #if NeedFunctionPrototypes
  2018.     Display*        /* display */,
  2019.     GC            /* gc */,
  2020.     unsigned long    /* valuemask */,
  2021.     XGCValues*        /* values */
  2022. #endif
  2023. );
  2024.  
  2025. extern XChangeKeyboardControl(
  2026. #if NeedFunctionPrototypes
  2027.     Display*        /* display */,
  2028.     unsigned long    /* value_mask */,
  2029.     XKeyboardControl*    /* values */
  2030. #endif
  2031. );
  2032.  
  2033. extern XChangeKeyboardMapping(
  2034. #if NeedFunctionPrototypes
  2035.     Display*        /* display */,
  2036.     int            /* first_keycode */,
  2037.     int            /* keysyms_per_keycode */,
  2038.     KeySym*        /* keysyms */,
  2039.     int            /* num_codes */
  2040. #endif
  2041. );
  2042.  
  2043. extern XChangePointerControl(
  2044. #if NeedFunctionPrototypes
  2045.     Display*        /* display */,
  2046.     Bool        /* do_accel */,
  2047.     Bool        /* do_threshold */,
  2048.     int            /* accel_numerator */,
  2049.     int            /* accel_denominator */,
  2050.     int            /* threshold */
  2051. #endif
  2052. );
  2053.  
  2054. extern XChangeProperty(
  2055. #if NeedFunctionPrototypes
  2056.     Display*        /* display */,
  2057.     Window        /* w */,
  2058.     Atom        /* property */,
  2059.     Atom        /* type */,
  2060.     int            /* format */,
  2061.     int            /* mode */,
  2062.     _Xconst unsigned char*    /* data */,
  2063.     int            /* nelements */
  2064. #endif
  2065. );
  2066.  
  2067. extern XChangeSaveSet(
  2068. #if NeedFunctionPrototypes
  2069.     Display*        /* display */,
  2070.     Window        /* w */,
  2071.     int            /* change_mode */
  2072. #endif
  2073. );
  2074.  
  2075. extern XChangeWindowAttributes(
  2076. #if NeedFunctionPrototypes
  2077.     Display*        /* display */,
  2078.     Window        /* w */,
  2079.     unsigned long    /* valuemask */,
  2080.     XSetWindowAttributes* /* attributes */
  2081. #endif
  2082. );
  2083.  
  2084. extern Bool XCheckIfEvent(
  2085. #if NeedFunctionPrototypes
  2086.     Display*        /* display */,
  2087.     XEvent*        /* event_return */,
  2088.     Bool (*) (
  2089. #if NeedNestedPrototypes
  2090.            Display*            /* display */,
  2091.                XEvent*            /* event */,
  2092.                XPointer            /* arg */
  2093. #endif
  2094.              )        /* predicate */,
  2095.     XPointer        /* arg */
  2096. #endif
  2097. );
  2098.  
  2099. extern Bool XCheckMaskEvent(
  2100. #if NeedFunctionPrototypes
  2101.     Display*        /* display */,
  2102.     long        /* event_mask */,
  2103.     XEvent*        /* event_return */
  2104. #endif
  2105. );
  2106.  
  2107. extern Bool XCheckTypedEvent(
  2108. #if NeedFunctionPrototypes
  2109.     Display*        /* display */,
  2110.     int            /* event_type */,
  2111.     XEvent*        /* event_return */
  2112. #endif
  2113. );
  2114.  
  2115. extern Bool XCheckTypedWindowEvent(
  2116. #if NeedFunctionPrototypes
  2117.     Display*        /* display */,
  2118.     Window        /* w */,
  2119.     int            /* event_type */,
  2120.     XEvent*        /* event_return */
  2121. #endif
  2122. );
  2123.  
  2124. extern Bool XCheckWindowEvent(
  2125. #if NeedFunctionPrototypes
  2126.     Display*        /* display */,
  2127.     Window        /* w */,
  2128.     long        /* event_mask */,
  2129.     XEvent*        /* event_return */
  2130. #endif
  2131. );
  2132.  
  2133. extern XCirculateSubwindows(
  2134. #if NeedFunctionPrototypes
  2135.     Display*        /* display */,
  2136.     Window        /* w */,
  2137.     int            /* direction */
  2138. #endif
  2139. );
  2140.  
  2141. extern XCirculateSubwindowsDown(
  2142. #if NeedFunctionPrototypes
  2143.     Display*        /* display */,
  2144.     Window        /* w */
  2145. #endif
  2146. );
  2147.  
  2148. extern XCirculateSubwindowsUp(
  2149. #if NeedFunctionPrototypes
  2150.     Display*        /* display */,
  2151.     Window        /* w */
  2152. #endif
  2153. );
  2154.  
  2155. extern XClearArea(
  2156. #if NeedFunctionPrototypes
  2157.     Display*        /* display */,
  2158.     Window        /* w */,
  2159.     int            /* x */,
  2160.     int            /* y */,
  2161.     unsigned int    /* width */,
  2162.     unsigned int    /* height */,
  2163.     Bool        /* exposures */
  2164. #endif
  2165. );
  2166.  
  2167. extern XClearWindow(
  2168. #if NeedFunctionPrototypes
  2169.     Display*        /* display */,
  2170.     Window        /* w */
  2171. #endif
  2172. );
  2173.  
  2174. extern XCloseDisplay(
  2175. #if NeedFunctionPrototypes
  2176.     Display*        /* display */
  2177. #endif
  2178. );
  2179.  
  2180. extern XConfigureWindow(
  2181. #if NeedFunctionPrototypes
  2182.     Display*        /* display */,
  2183.     Window        /* w */,
  2184.     unsigned int    /* value_mask */,
  2185.     XWindowChanges*    /* values */         
  2186. #endif
  2187. );
  2188.  
  2189. extern int XConnectionNumber(
  2190. #if NeedFunctionPrototypes
  2191.     Display*        /* display */
  2192. #endif
  2193. );
  2194.  
  2195. extern XConvertSelection(
  2196. #if NeedFunctionPrototypes
  2197.     Display*        /* display */,
  2198.     Atom        /* selection */,
  2199.     Atom         /* target */,
  2200.     Atom        /* property */,
  2201.     Window        /* requestor */,
  2202.     Time        /* time */
  2203. #endif
  2204. );
  2205.  
  2206. extern XCopyArea(
  2207. #if NeedFunctionPrototypes
  2208.     Display*        /* display */,
  2209.     Drawable        /* src */,
  2210.     Drawable        /* dest */,
  2211.     GC            /* gc */,
  2212.     int            /* src_x */,
  2213.     int            /* src_y */,
  2214.     unsigned int    /* width */,
  2215.     unsigned int    /* height */,
  2216.     int            /* dest_x */,
  2217.     int            /* dest_y */
  2218. #endif
  2219. );
  2220.  
  2221. extern XCopyGC(
  2222. #if NeedFunctionPrototypes
  2223.     Display*        /* display */,
  2224.     GC            /* src */,
  2225.     unsigned long    /* valuemask */,
  2226.     GC            /* dest */
  2227. #endif
  2228. );
  2229.  
  2230. extern XCopyPlane(
  2231. #if NeedFunctionPrototypes
  2232.     Display*        /* display */,
  2233.     Drawable        /* src */,
  2234.     Drawable        /* dest */,
  2235.     GC            /* gc */,
  2236.     int            /* src_x */,
  2237.     int            /* src_y */,
  2238.     unsigned int    /* width */,
  2239.     unsigned int    /* height */,
  2240.     int            /* dest_x */,
  2241.     int            /* dest_y */,
  2242.     unsigned long    /* plane */
  2243. #endif
  2244. );
  2245.  
  2246. extern int XDefaultDepth(
  2247. #if NeedFunctionPrototypes
  2248.     Display*        /* display */,
  2249.     int            /* screen_number */
  2250. #endif
  2251. );
  2252.  
  2253. extern int XDefaultDepthOfScreen(
  2254. #if NeedFunctionPrototypes
  2255.     Screen*        /* screen */
  2256. #endif
  2257. );
  2258.  
  2259. extern int XDefaultScreen(
  2260. #if NeedFunctionPrototypes
  2261.     Display*        /* display */
  2262. #endif
  2263. );
  2264.  
  2265. extern XDefineCursor(
  2266. #if NeedFunctionPrototypes
  2267.     Display*        /* display */,
  2268.     Window        /* w */,
  2269.     Cursor        /* cursor */
  2270. #endif
  2271. );
  2272.  
  2273. extern XDeleteProperty(
  2274. #if NeedFunctionPrototypes
  2275.     Display*        /* display */,
  2276.     Window        /* w */,
  2277.     Atom        /* property */
  2278. #endif
  2279. );
  2280.  
  2281. extern XDestroyWindow(
  2282. #if NeedFunctionPrototypes
  2283.     Display*        /* display */,
  2284.     Window        /* w */
  2285. #endif
  2286. );
  2287.  
  2288. extern XDestroySubwindows(
  2289. #if NeedFunctionPrototypes
  2290.     Display*        /* display */,
  2291.     Window        /* w */
  2292. #endif
  2293. );
  2294.  
  2295. extern int XDoesBackingStore(
  2296. #if NeedFunctionPrototypes
  2297.     Screen*        /* screen */    
  2298. #endif
  2299. );
  2300.  
  2301. extern Bool XDoesSaveUnders(
  2302. #if NeedFunctionPrototypes
  2303.     Screen*        /* screen */
  2304. #endif
  2305. );
  2306.  
  2307. extern XDisableAccessControl(
  2308. #if NeedFunctionPrototypes
  2309.     Display*        /* display */
  2310. #endif
  2311. );
  2312.  
  2313.  
  2314. extern int XDisplayCells(
  2315. #if NeedFunctionPrototypes
  2316.     Display*        /* display */,
  2317.     int            /* screen_number */
  2318. #endif
  2319. );
  2320.  
  2321. extern int XDisplayHeight(
  2322. #if NeedFunctionPrototypes
  2323.     Display*        /* display */,
  2324.     int            /* screen_number */
  2325. #endif
  2326. );
  2327.  
  2328. extern int XDisplayHeightMM(
  2329. #if NeedFunctionPrototypes
  2330.     Display*        /* display */,
  2331.     int            /* screen_number */
  2332. #endif
  2333. );
  2334.  
  2335. extern XDisplayKeycodes(
  2336. #if NeedFunctionPrototypes
  2337.     Display*        /* display */,
  2338.     int*        /* min_keycodes_return */,
  2339.     int*        /* max_keycodes_return */
  2340. #endif
  2341. );
  2342.  
  2343. extern int XDisplayPlanes(
  2344. #if NeedFunctionPrototypes
  2345.     Display*        /* display */,
  2346.     int            /* screen_number */
  2347. #endif
  2348. );
  2349.  
  2350. extern int XDisplayWidth(
  2351. #if NeedFunctionPrototypes
  2352.     Display*        /* display */,
  2353.     int            /* screen_number */
  2354. #endif
  2355. );
  2356.  
  2357. extern int XDisplayWidthMM(
  2358. #if NeedFunctionPrototypes
  2359.     Display*        /* display */,
  2360.     int            /* screen_number */
  2361. #endif
  2362. );
  2363.  
  2364. extern XDrawArc(
  2365. #if NeedFunctionPrototypes
  2366.     Display*        /* display */,
  2367.     Drawable        /* d */,
  2368.     GC            /* gc */,
  2369.     int            /* x */,
  2370.     int            /* y */,
  2371.     unsigned int    /* width */,
  2372.     unsigned int    /* height */,
  2373.     int            /* angle1 */,
  2374.     int            /* angle2 */
  2375. #endif
  2376. );
  2377.  
  2378. extern XDrawArcs(
  2379. #if NeedFunctionPrototypes
  2380.     Display*        /* display */,
  2381.     Drawable        /* d */,
  2382.     GC            /* gc */,
  2383.     XArc*        /* arcs */,
  2384.     int            /* narcs */
  2385. #endif
  2386. );
  2387.  
  2388. extern XDrawImageString(
  2389. #if NeedFunctionPrototypes
  2390.     Display*        /* display */,
  2391.     Drawable        /* d */,
  2392.     GC            /* gc */,
  2393.     int            /* x */,
  2394.     int            /* y */,
  2395.     _Xconst char*    /* string */,
  2396.     int            /* length */
  2397. #endif
  2398. );
  2399.  
  2400. extern XDrawImageString16(
  2401. #if NeedFunctionPrototypes
  2402.     Display*        /* display */,
  2403.     Drawable        /* d */,
  2404.     GC            /* gc */,
  2405.     int            /* x */,
  2406.     int            /* y */,
  2407.     _Xconst XChar2b*    /* string */,
  2408.     int            /* length */
  2409. #endif
  2410. );
  2411.  
  2412. extern XDrawLine(
  2413. #if NeedFunctionPrototypes
  2414.     Display*        /* display */,
  2415.     Drawable        /* d */,
  2416.     GC            /* gc */,
  2417.     int            /* x1 */,
  2418.     int            /* x2 */,
  2419.     int            /* y1 */,
  2420.     int            /* y2 */
  2421. #endif
  2422. );
  2423.  
  2424. extern XDrawLines(
  2425. #if NeedFunctionPrototypes
  2426.     Display*        /* display */,
  2427.     Drawable        /* d */,
  2428.     GC            /* gc */,
  2429.     XPoint*        /* points */,
  2430.     int            /* npoints */,
  2431.     int            /* mode */
  2432. #endif
  2433. );
  2434.  
  2435. extern XDrawPoint(
  2436. #if NeedFunctionPrototypes
  2437.     Display*        /* display */,
  2438.     Drawable        /* d */,
  2439.     GC            /* gc */,
  2440.     int            /* x */,
  2441.     int            /* y */
  2442. #endif
  2443. );
  2444.  
  2445. extern XDrawPoints(
  2446. #if NeedFunctionPrototypes
  2447.     Display*        /* display */,
  2448.     Drawable        /* d */,
  2449.     GC            /* gc */,
  2450.     XPoint*        /* points */,
  2451.     int            /* npoints */,
  2452.     int            /* mode */
  2453. #endif
  2454. );
  2455.  
  2456. extern XDrawRectangle(
  2457. #if NeedFunctionPrototypes
  2458.     Display*        /* display */,
  2459.     Drawable        /* d */,
  2460.     GC            /* gc */,
  2461.     int            /* x */,
  2462.     int            /* y */,
  2463.     unsigned int    /* width */,
  2464.     unsigned int    /* height */
  2465. #endif
  2466. );
  2467.  
  2468. extern XDrawRectangles(
  2469. #if NeedFunctionPrototypes
  2470.     Display*        /* display */,
  2471.     Drawable        /* d */,
  2472.     GC            /* gc */,
  2473.     XRectangle*        /* rectangles */,
  2474.     int            /* nrectangles */
  2475. #endif
  2476. );
  2477.  
  2478. extern XDrawSegments(
  2479. #if NeedFunctionPrototypes
  2480.     Display*        /* display */,
  2481.     Drawable        /* d */,
  2482.     GC            /* gc */,
  2483.     XSegment*        /* segments */,
  2484.     int            /* nsegments */
  2485. #endif
  2486. );
  2487.  
  2488. extern XDrawString(
  2489. #if NeedFunctionPrototypes
  2490.     Display*        /* display */,
  2491.     Drawable        /* d */,
  2492.     GC            /* gc */,
  2493.     int            /* x */,
  2494.     int            /* y */,
  2495.     _Xconst char*    /* string */,
  2496.     int            /* length */
  2497. #endif
  2498. );
  2499.  
  2500. extern XDrawString16(
  2501. #if NeedFunctionPrototypes
  2502.     Display*        /* display */,
  2503.     Drawable        /* d */,
  2504.     GC            /* gc */,
  2505.     int            /* x */,
  2506.     int            /* y */,
  2507.     _Xconst XChar2b*    /* string */,
  2508.     int            /* length */
  2509. #endif
  2510. );
  2511.  
  2512. extern XDrawText(
  2513. #if NeedFunctionPrototypes
  2514.     Display*        /* display */,
  2515.     Drawable        /* d */,
  2516.     GC            /* gc */,
  2517.     int            /* x */,
  2518.     int            /* y */,
  2519.     XTextItem*        /* items */,
  2520.     int            /* nitems */
  2521. #endif
  2522. );
  2523.  
  2524. extern XDrawText16(
  2525. #if NeedFunctionPrototypes
  2526.     Display*        /* display */,
  2527.     Drawable        /* d */,
  2528.     GC            /* gc */,
  2529.     int            /* x */,
  2530.     int            /* y */,
  2531.     XTextItem16*    /* items */,
  2532.     int            /* nitems */
  2533. #endif
  2534. );
  2535.  
  2536. extern XEnableAccessControl(
  2537. #if NeedFunctionPrototypes
  2538.     Display*        /* display */
  2539. #endif
  2540. );
  2541.  
  2542. extern int XEventsQueued(
  2543. #if NeedFunctionPrototypes
  2544.     Display*        /* display */,
  2545.     int            /* mode */
  2546. #endif
  2547. );
  2548.  
  2549. extern Status XFetchName(
  2550. #if NeedFunctionPrototypes
  2551.     Display*        /* display */,
  2552.     Window        /* w */,
  2553.     char**        /* window_name_return */
  2554. #endif
  2555. );
  2556.  
  2557. extern XFillArc(
  2558. #if NeedFunctionPrototypes
  2559.     Display*        /* display */,
  2560.     Drawable        /* d */,
  2561.     GC            /* gc */,
  2562.     int            /* x */,
  2563.     int            /* y */,
  2564.     unsigned int    /* width */,
  2565.     unsigned int    /* height */,
  2566.     int            /* angle1 */,
  2567.     int            /* angle2 */
  2568. #endif
  2569. );
  2570.  
  2571. extern XFillArcs(
  2572. #if NeedFunctionPrototypes
  2573.     Display*        /* display */,
  2574.     Drawable        /* d */,
  2575.     GC            /* gc */,
  2576.     XArc*        /* arcs */,
  2577.     int            /* narcs */
  2578. #endif
  2579. );
  2580.  
  2581. extern XFillPolygon(
  2582. #if NeedFunctionPrototypes
  2583.     Display*        /* display */,
  2584.     Drawable        /* d */,
  2585.     GC            /* gc */,
  2586.     XPoint*        /* points */,
  2587.     int            /* npoints */,
  2588.     int            /* shape */,
  2589.     int            /* mode */
  2590. #endif
  2591. );
  2592.  
  2593. extern XFillRectangle(
  2594. #if NeedFunctionPrototypes
  2595.     Display*        /* display */,
  2596.     Drawable        /* d */,
  2597.     GC            /* gc */,
  2598.     int            /* x */,
  2599.     int            /* y */,
  2600.     unsigned int    /* width */,
  2601.     unsigned int    /* height */
  2602. #endif
  2603. );
  2604.  
  2605. extern XFillRectangles(
  2606. #if NeedFunctionPrototypes
  2607.     Display*        /* display */,
  2608.     Drawable        /* d */,
  2609.     GC            /* gc */,
  2610.     XRectangle*        /* rectangles */,
  2611.     int            /* nrectangles */
  2612. #endif
  2613. );
  2614.  
  2615. extern XFlush(
  2616. #if NeedFunctionPrototypes
  2617.     Display*        /* display */
  2618. #endif
  2619. );
  2620.  
  2621. extern XForceScreenSaver(
  2622. #if NeedFunctionPrototypes
  2623.     Display*        /* display */,
  2624.     int            /* mode */
  2625. #endif
  2626. );
  2627.  
  2628. extern XFree(
  2629. #if NeedFunctionPrototypes
  2630.     void*        /* data */
  2631. #endif
  2632. );
  2633.  
  2634. extern XFreeColormap(
  2635. #if NeedFunctionPrototypes
  2636.     Display*        /* display */,
  2637.     Colormap        /* colormap */
  2638. #endif
  2639. );
  2640.  
  2641. extern XFreeColors(
  2642. #if NeedFunctionPrototypes
  2643.     Display*        /* display */,
  2644.     Colormap        /* colormap */,
  2645.     unsigned long*    /* pixels */,
  2646.     int            /* npixels */,
  2647.     unsigned long    /* planes */
  2648. #endif
  2649. );
  2650.  
  2651. extern XFreeCursor(
  2652. #if NeedFunctionPrototypes
  2653.     Display*        /* display */,
  2654.     Cursor        /* cursor */
  2655. #endif
  2656. );
  2657.  
  2658. extern XFreeExtensionList(
  2659. #if NeedFunctionPrototypes
  2660.     char**        /* list */    
  2661. #endif
  2662. );
  2663.  
  2664. extern XFreeFont(
  2665. #if NeedFunctionPrototypes
  2666.     Display*        /* display */,
  2667.     XFontStruct*    /* font_struct */
  2668. #endif
  2669. );
  2670.  
  2671. extern XFreeFontInfo(
  2672. #if NeedFunctionPrototypes
  2673.     char**        /* names */,
  2674.     XFontStruct*    /* free_info */,
  2675.     int            /* actual_count */
  2676. #endif
  2677. );
  2678.  
  2679. extern XFreeFontNames(
  2680. #if NeedFunctionPrototypes
  2681.     char**        /* list */
  2682. #endif
  2683. );
  2684.  
  2685. extern XFreeFontPath(
  2686. #if NeedFunctionPrototypes
  2687.     char**        /* list */
  2688. #endif
  2689. );
  2690.  
  2691. extern XFreeGC(
  2692. #if NeedFunctionPrototypes
  2693.     Display*        /* display */,
  2694.     GC            /* gc */
  2695. #endif
  2696. );
  2697.  
  2698. extern XFreeModifiermap(
  2699. #if NeedFunctionPrototypes
  2700.     XModifierKeymap*    /* modmap */
  2701. #endif
  2702. );
  2703.  
  2704. extern XFreePixmap(
  2705. #if NeedFunctionPrototypes
  2706.     Display*        /* display */,
  2707.     Pixmap        /* pixmap */
  2708. #endif
  2709. );
  2710.  
  2711. extern int XGeometry(
  2712. #if NeedFunctionPrototypes
  2713.     Display*        /* display */,
  2714.     int            /* screen */,
  2715.     _Xconst char*    /* position */,
  2716.     _Xconst char*    /* default_position */,
  2717.     unsigned int    /* bwidth */,
  2718.     unsigned int    /* fwidth */,
  2719.     unsigned int    /* fheight */,
  2720.     int            /* xadder */,
  2721.     int            /* yadder */,
  2722.     int*        /* x_return */,
  2723.     int*        /* y_return */,
  2724.     int*        /* width_return */,
  2725.     int*        /* height_return */
  2726. #endif
  2727. );
  2728.  
  2729. extern XGetErrorDatabaseText(
  2730. #if NeedFunctionPrototypes
  2731.     Display*        /* display */,
  2732.     _Xconst char*    /* name */,
  2733.     _Xconst char*    /* message */,
  2734.     _Xconst char*    /* default_string */,
  2735.     char*        /* buffer_return */,
  2736.     int            /* length */
  2737. #endif
  2738. );
  2739.  
  2740. extern XGetErrorText(
  2741. #if NeedFunctionPrototypes
  2742.     Display*        /* display */,
  2743.     int            /* code */,
  2744.     char*        /* buffer_return */,
  2745.     int            /* length */
  2746. #endif
  2747. );
  2748.  
  2749. extern Bool XGetFontProperty(
  2750. #if NeedFunctionPrototypes
  2751.     XFontStruct*    /* font_struct */,
  2752.     Atom        /* atom */,
  2753.     unsigned long*    /* value_return */
  2754. #endif
  2755. );
  2756.  
  2757. extern Status XGetGCValues(
  2758. #if NeedFunctionPrototypes
  2759.     Display*        /* display */,
  2760.     GC            /* gc */,
  2761.     unsigned long    /* valuemask */,
  2762.     XGCValues*        /* values_return */
  2763. #endif
  2764. );
  2765.  
  2766. extern Status XGetGeometry(
  2767. #if NeedFunctionPrototypes
  2768.     Display*        /* display */,
  2769.     Drawable        /* d */,
  2770.     Window*        /* root_return */,
  2771.     int*        /* x_return */,
  2772.     int*        /* y_return */,
  2773.     unsigned int*    /* width_return */,
  2774.     unsigned int*    /* height_return */,
  2775.     unsigned int*    /* border_width_return */,
  2776.     unsigned int*    /* depth_return */
  2777. #endif
  2778. );
  2779.  
  2780. extern Status XGetIconName(
  2781. #if NeedFunctionPrototypes
  2782.     Display*        /* display */,
  2783.     Window        /* w */,
  2784.     char**        /* icon_name_return */
  2785. #endif
  2786. );
  2787.  
  2788. extern XGetInputFocus(
  2789. #if NeedFunctionPrototypes
  2790.     Display*        /* display */,
  2791.     Window*        /* focus_return */,
  2792.     int*        /* revert_to_return */
  2793. #endif
  2794. );
  2795.  
  2796. extern XGetKeyboardControl(
  2797. #if NeedFunctionPrototypes
  2798.     Display*        /* display */,
  2799.     XKeyboardState*    /* values_return */
  2800. #endif
  2801. );
  2802.  
  2803. extern XGetPointerControl(
  2804. #if NeedFunctionPrototypes
  2805.     Display*        /* display */,
  2806.     int*        /* accel_numerator_return */,
  2807.     int*        /* accel_denominator_return */,
  2808.     int*        /* threshold_return */
  2809. #endif
  2810. );
  2811.  
  2812. extern int XGetPointerMapping(
  2813. #if NeedFunctionPrototypes
  2814.     Display*        /* display */,
  2815.     unsigned char*    /* map_return */,
  2816.     int            /* nmap */
  2817. #endif
  2818. );
  2819.  
  2820. extern XGetScreenSaver(
  2821. #if NeedFunctionPrototypes
  2822.     Display*        /* display */,
  2823.     int*        /* timeout_return */,
  2824.     int*        /* interval_return */,
  2825.     int*        /* prefer_blanking_return */,
  2826.     int*        /* allow_exposures_return */
  2827. #endif
  2828. );
  2829.  
  2830. extern Status XGetTransientForHint(
  2831. #if NeedFunctionPrototypes
  2832.     Display*        /* display */,
  2833.     Window        /* w */,
  2834.     Window*        /* prop_window_return */
  2835. #endif
  2836. );
  2837.  
  2838. extern int XGetWindowProperty(
  2839. #if NeedFunctionPrototypes
  2840.     Display*        /* display */,
  2841.     Window        /* w */,
  2842.     Atom        /* property */,
  2843.     long        /* long_offset */,
  2844.     long        /* long_length */,
  2845.     Bool        /* delete */,
  2846.     Atom        /* req_type */,
  2847.     Atom*        /* actual_type_return */,
  2848.     int*        /* actual_format_return */,
  2849.     unsigned long*    /* nitems_return */,
  2850.     unsigned long*    /* bytes_after_return */,
  2851.     unsigned char**    /* prop_return */
  2852. #endif
  2853. );
  2854.  
  2855. extern Status XGetWindowAttributes(
  2856. #if NeedFunctionPrototypes
  2857.     Display*        /* display */,
  2858.     Window        /* w */,
  2859.     XWindowAttributes*    /* window_attributes_return */
  2860. #endif
  2861. );
  2862.  
  2863. extern XGrabButton(
  2864. #if NeedFunctionPrototypes
  2865.     Display*        /* display */,
  2866.     unsigned int    /* button */,
  2867.     unsigned int    /* modifiers */,
  2868.     Window        /* grab_window */,
  2869.     Bool        /* owner_events */,
  2870.     unsigned int    /* event_mask */,
  2871.     int            /* pointer_mode */,
  2872.     int            /* keyboard_mode */,
  2873.     Window        /* confine_to */,
  2874.     Cursor        /* cursor */
  2875. #endif
  2876. );
  2877.  
  2878. extern XGrabKey(
  2879. #if NeedFunctionPrototypes
  2880.     Display*        /* display */,
  2881.     int            /* keycode */,
  2882.     unsigned int    /* modifiers */,
  2883.     Window        /* grab_window */,
  2884.     Bool        /* owner_events */,
  2885.     int            /* pointer_mode */,
  2886.     int            /* keyboard_mode */
  2887. #endif
  2888. );
  2889.  
  2890. extern int XGrabKeyboard(
  2891. #if NeedFunctionPrototypes
  2892.     Display*        /* display */,
  2893.     Window        /* grab_window */,
  2894.     Bool        /* owner_events */,
  2895.     int            /* pointer_mode */,
  2896.     int            /* keyboard_mode */,
  2897.     Time        /* time */
  2898. #endif
  2899. );
  2900.  
  2901. extern int XGrabPointer(
  2902. #if NeedFunctionPrototypes
  2903.     Display*        /* display */,
  2904.     Window        /* grab_window */,
  2905.     Bool        /* owner_events */,
  2906.     unsigned int    /* event_mask */,
  2907.     int            /* pointer_mode */,
  2908.     int            /* keyboard_mode */,
  2909.     Window        /* confine_to */,
  2910.     Cursor        /* cursor */,
  2911.     Time        /* time */
  2912. #endif
  2913. );
  2914.  
  2915. extern XGrabServer(
  2916. #if NeedFunctionPrototypes
  2917.     Display*        /* display */
  2918. #endif
  2919. );
  2920.  
  2921. extern int XHeightMMOfScreen(
  2922. #if NeedFunctionPrototypes
  2923.     Screen*        /* screen */
  2924. #endif
  2925. );
  2926.  
  2927. extern int XHeightOfScreen(
  2928. #if NeedFunctionPrototypes
  2929.     Screen*        /* screen */
  2930. #endif
  2931. );
  2932.  
  2933. extern XIfEvent(
  2934. #if NeedFunctionPrototypes
  2935.     Display*        /* display */,
  2936.     XEvent*        /* event_return */,
  2937.     Bool (*) (
  2938. #if NeedNestedPrototypes
  2939.            Display*            /* display */,
  2940.                XEvent*            /* event */,
  2941.                XPointer            /* arg */
  2942. #endif
  2943.              )        /* predicate */,
  2944.     XPointer        /* arg */
  2945. #endif
  2946. );
  2947.  
  2948. extern int XImageByteOrder(
  2949. #if NeedFunctionPrototypes
  2950.     Display*        /* display */
  2951. #endif
  2952. );
  2953.  
  2954. extern XInstallColormap(
  2955. #if NeedFunctionPrototypes
  2956.     Display*        /* display */,
  2957.     Colormap        /* colormap */
  2958. #endif
  2959. );
  2960.  
  2961. extern KeyCode XKeysymToKeycode(
  2962. #if NeedFunctionPrototypes
  2963.     Display*        /* display */,
  2964.     KeySym        /* keysym */
  2965. #endif
  2966. );
  2967.  
  2968. extern XKillClient(
  2969. #if NeedFunctionPrototypes
  2970.     Display*        /* display */,
  2971.     XID            /* resource */
  2972. #endif
  2973. );
  2974.  
  2975. extern unsigned long XLastKnownRequestProcessed(
  2976. #if NeedFunctionPrototypes
  2977.     Display*        /* display */
  2978. #endif
  2979. );
  2980.  
  2981. extern Status XLookupColor(
  2982. #if NeedFunctionPrototypes
  2983.     Display*        /* display */,
  2984.     Colormap        /* colormap */,
  2985.     _Xconst char*    /* color_name */,
  2986.     XColor*        /* exact_def_return */,
  2987.     XColor*        /* screen_def_return */
  2988. #endif
  2989. );
  2990.  
  2991. extern XLowerWindow(
  2992. #if NeedFunctionPrototypes
  2993.     Display*        /* display */,
  2994.     Window        /* w */
  2995. #endif
  2996. );
  2997.  
  2998. extern XMapRaised(
  2999. #if NeedFunctionPrototypes
  3000.     Display*        /* display */,
  3001.     Window        /* w */
  3002. #endif
  3003. );
  3004.  
  3005. extern XMapSubwindows(
  3006. #if NeedFunctionPrototypes
  3007.     Display*        /* display */,
  3008.     Window        /* w */
  3009. #endif
  3010. );
  3011.  
  3012. extern XMapWindow(
  3013. #if NeedFunctionPrototypes
  3014.     Display*        /* display */,
  3015.     Window        /* w */
  3016. #endif
  3017. );
  3018.  
  3019. extern XMaskEvent(
  3020. #if NeedFunctionPrototypes
  3021.     Display*        /* display */,
  3022.     long        /* event_mask */,
  3023.     XEvent*        /* event_return */
  3024. #endif
  3025. );
  3026.  
  3027. extern int XMaxCmapsOfScreen(
  3028. #if NeedFunctionPrototypes
  3029.     Screen*        /* screen */
  3030. #endif
  3031. );
  3032.  
  3033. extern int XMinCmapsOfScreen(
  3034. #if NeedFunctionPrototypes
  3035.     Screen*        /* screen */
  3036. #endif
  3037. );
  3038.  
  3039. extern XMoveResizeWindow(
  3040. #if NeedFunctionPrototypes
  3041.     Display*        /* display */,
  3042.     Window        /* w */,
  3043.     int            /* x */,
  3044.     int            /* y */,
  3045.     unsigned int    /* width */,
  3046.     unsigned int    /* height */
  3047. #endif
  3048. );
  3049.  
  3050. extern XMoveWindow(
  3051. #if NeedFunctionPrototypes
  3052.     Display*        /* display */,
  3053.     Window        /* w */,
  3054.     int            /* x */,
  3055.     int            /* y */
  3056. #endif
  3057. );
  3058.  
  3059. extern XNextEvent(
  3060. #if NeedFunctionPrototypes
  3061.     Display*        /* display */,
  3062.     XEvent*        /* event_return */
  3063. #endif
  3064. );
  3065.  
  3066. extern XNoOp(
  3067. #if NeedFunctionPrototypes
  3068.     Display*        /* display */
  3069. #endif
  3070. );
  3071.  
  3072. extern Status XParseColor(
  3073. #if NeedFunctionPrototypes
  3074.     Display*        /* display */,
  3075.     Colormap        /* colormap */,
  3076.     _Xconst char*    /* spec */,
  3077.     XColor*        /* exact_def_return */
  3078. #endif
  3079. );
  3080.  
  3081. extern int XParseGeometry(
  3082. #if NeedFunctionPrototypes
  3083.     _Xconst char*    /* parsestring */,
  3084.     int*        /* x_return */,
  3085.     int*        /* y_return */,
  3086.     unsigned int*    /* width_return */,
  3087.     unsigned int*    /* height_return */
  3088. #endif
  3089. );
  3090.  
  3091. extern XPeekEvent(
  3092. #if NeedFunctionPrototypes
  3093.     Display*        /* display */,
  3094.     XEvent*        /* event_return */
  3095. #endif
  3096. );
  3097.  
  3098. extern XPeekIfEvent(
  3099. #if NeedFunctionPrototypes
  3100.     Display*        /* display */,
  3101.     XEvent*        /* event_return */,
  3102.     Bool (*) (
  3103. #if NeedNestedPrototypes
  3104.            Display*        /* display */,
  3105.                XEvent*        /* event */,
  3106.                XPointer        /* arg */
  3107. #endif
  3108.              )        /* predicate */,
  3109.     XPointer        /* arg */
  3110. #endif
  3111. );
  3112.  
  3113. extern int XPending(
  3114. #if NeedFunctionPrototypes
  3115.     Display*        /* display */
  3116. #endif
  3117. );
  3118.  
  3119. extern int XPlanesOfScreen(
  3120. #if NeedFunctionPrototypes
  3121.     Screen*        /* screen */
  3122.     
  3123. #endif
  3124. );
  3125.  
  3126. extern int XProtocolRevision(
  3127. #if NeedFunctionPrototypes
  3128.     Display*        /* display */
  3129. #endif
  3130. );
  3131.  
  3132. extern int XProtocolVersion(
  3133. #if NeedFunctionPrototypes
  3134.     Display*        /* display */
  3135. #endif
  3136. );
  3137.  
  3138.  
  3139. extern XPutBackEvent(
  3140. #if NeedFunctionPrototypes
  3141.     Display*        /* display */,
  3142.     XEvent*        /* event */
  3143. #endif
  3144. );
  3145.  
  3146. extern XPutImage(
  3147. #if NeedFunctionPrototypes
  3148.     Display*        /* display */,
  3149.     Drawable        /* d */,
  3150.     GC            /* gc */,
  3151.     XImage*        /* image */,
  3152.     int            /* src_x */,
  3153.     int            /* src_y */,
  3154.     int            /* dest_x */,
  3155.     int            /* dest_y */,
  3156.     unsigned int    /* width */,
  3157.     unsigned int    /* height */      
  3158. #endif
  3159. );
  3160.  
  3161. extern int XQLength(
  3162. #if NeedFunctionPrototypes
  3163.     Display*        /* display */
  3164. #endif
  3165. );
  3166.  
  3167. extern Status XQueryBestCursor(
  3168. #if NeedFunctionPrototypes
  3169.     Display*        /* display */,
  3170.     Drawable        /* d */,
  3171.     unsigned int        /* width */,
  3172.     unsigned int    /* height */,
  3173.     unsigned int*    /* width_return */,
  3174.     unsigned int*    /* height_return */
  3175. #endif
  3176. );
  3177.  
  3178. extern Status XQueryBestSize(
  3179. #if NeedFunctionPrototypes
  3180.     Display*        /* display */,
  3181.     int            /* class */,
  3182.     Drawable        /* which_screen */,
  3183.     unsigned int    /* width */,
  3184.     unsigned int    /* height */,
  3185.     unsigned int*    /* width_return */,
  3186.     unsigned int*    /* height_return */
  3187. #endif
  3188. );
  3189.  
  3190. extern Status XQueryBestStipple(
  3191. #if NeedFunctionPrototypes
  3192.     Display*        /* display */,
  3193.     Drawable        /* which_screen */,
  3194.     unsigned int    /* width */,
  3195.     unsigned int    /* height */,
  3196.     unsigned int*    /* width_return */,
  3197.     unsigned int*    /* height_return */
  3198. #endif
  3199. );
  3200.  
  3201. extern Status XQueryBestTile(
  3202. #if NeedFunctionPrototypes
  3203.     Display*        /* display */,
  3204.     Drawable        /* which_screen */,
  3205.     unsigned int    /* width */,
  3206.     unsigned int    /* height */,
  3207.     unsigned int*    /* width_return */,
  3208.     unsigned int*    /* height_return */
  3209. #endif
  3210. );
  3211.  
  3212. extern XQueryColor(
  3213. #if NeedFunctionPrototypes
  3214.     Display*        /* display */,
  3215.     Colormap        /* colormap */,
  3216.     XColor*        /* def_in_out */
  3217. #endif
  3218. );
  3219.  
  3220. extern XQueryColors(
  3221. #if NeedFunctionPrototypes
  3222.     Display*        /* display */,
  3223.     Colormap        /* colormap */,
  3224.     XColor*        /* defs_in_out */,
  3225.     int            /* ncolors */
  3226. #endif
  3227. );
  3228.  
  3229. extern Bool XQueryExtension(
  3230. #if NeedFunctionPrototypes
  3231.     Display*        /* display */,
  3232.     _Xconst char*    /* name */,
  3233.     int*        /* major_opcode_return */,
  3234.     int*        /* first_event_return */,
  3235.     int*        /* first_error_return */
  3236. #endif
  3237. );
  3238.  
  3239. extern XQueryKeymap(
  3240. #if NeedFunctionPrototypes
  3241.     Display*        /* display */,
  3242.     char [32]        /* keys_return */
  3243. #endif
  3244. );
  3245.  
  3246. extern Bool XQueryPointer(
  3247. #if NeedFunctionPrototypes
  3248.     Display*        /* display */,
  3249.     Window        /* w */,
  3250.     Window*        /* root_return */,
  3251.     Window*        /* child_return */,
  3252.     int*        /* root_x_return */,
  3253.     int*        /* root_y_return */,
  3254.     int*        /* win_x_return */,
  3255.     int*        /* win_y_return */,
  3256.     unsigned int*       /* mask_return */
  3257. #endif
  3258. );
  3259.  
  3260. extern XQueryTextExtents(
  3261. #if NeedFunctionPrototypes
  3262.     Display*        /* display */,
  3263.     XID            /* font_ID */,
  3264.     _Xconst char*    /* string */,
  3265.     int            /* nchars */,
  3266.     int*        /* direction_return */,
  3267.     int*        /* font_ascent_return */,
  3268.     int*        /* font_descent_return */,
  3269.     XCharStruct*    /* overall_return */    
  3270. #endif
  3271. );
  3272.  
  3273. extern XQueryTextExtents16(
  3274. #if NeedFunctionPrototypes
  3275.     Display*        /* display */,
  3276.     XID            /* font_ID */,
  3277.     _Xconst XChar2b*    /* string */,
  3278.     int            /* nchars */,
  3279.     int*        /* direction_return */,
  3280.     int*        /* font_ascent_return */,
  3281.     int*        /* font_descent_return */,
  3282.     XCharStruct*    /* overall_return */
  3283. #endif
  3284. );
  3285.  
  3286. extern Status XQueryTree(
  3287. #if NeedFunctionPrototypes
  3288.     Display*        /* display */,
  3289.     Window        /* w */,
  3290.     Window*        /* root_return */,
  3291.     Window*        /* parent_return */,
  3292.     Window**        /* children_return */,
  3293.     unsigned int*    /* nchildren_return */
  3294. #endif
  3295. );
  3296.  
  3297. extern XRaiseWindow(
  3298. #if NeedFunctionPrototypes
  3299.     Display*        /* display */,
  3300.     Window        /* w */
  3301. #endif
  3302. );
  3303.  
  3304. extern int XReadBitmapFile(
  3305. #if NeedFunctionPrototypes
  3306.     Display*        /* display */,
  3307.     Drawable         /* d */,
  3308.     _Xconst char*    /* filename */,
  3309.     unsigned int*    /* width_return */,
  3310.     unsigned int*    /* height_return */,
  3311.     Pixmap*        /* bitmap_return */,
  3312.     int*        /* x_hot_return */,
  3313.     int*        /* y_hot_return */
  3314. #endif
  3315. );
  3316.  
  3317. extern XRebindKeysym(
  3318. #if NeedFunctionPrototypes
  3319.     Display*        /* display */,
  3320.     KeySym        /* keysym */,
  3321.     KeySym*        /* list */,
  3322.     int            /* mod_count */,
  3323.     _Xconst unsigned char*    /* string */,
  3324.     int            /* bytes_string */
  3325. #endif
  3326. );
  3327.  
  3328. extern XRecolorCursor(
  3329. #if NeedFunctionPrototypes
  3330.     Display*        /* display */,
  3331.     Cursor        /* cursor */,
  3332.     XColor*        /* foreground_color */,
  3333.     XColor*        /* background_color */
  3334. #endif
  3335. );
  3336.  
  3337. extern XRefreshKeyboardMapping(
  3338. #if NeedFunctionPrototypes
  3339.     XMappingEvent*    /* event_map */    
  3340. #endif
  3341. );
  3342.  
  3343. extern XRemoveFromSaveSet(
  3344. #if NeedFunctionPrototypes
  3345.     Display*        /* display */,
  3346.     Window        /* w */
  3347. #endif
  3348. );
  3349.  
  3350. extern XRemoveHost(
  3351. #if NeedFunctionPrototypes
  3352.     Display*        /* display */,
  3353.     XHostAddress*    /* host */
  3354. #endif
  3355. );
  3356.  
  3357. extern XRemoveHosts(
  3358. #if NeedFunctionPrototypes
  3359.     Display*        /* display */,
  3360.     XHostAddress*    /* hosts */,
  3361.     int            /* num_hosts */
  3362. #endif
  3363. );
  3364.  
  3365. extern XReparentWindow(
  3366. #if NeedFunctionPrototypes
  3367.     Display*        /* display */,
  3368.     Window        /* w */,
  3369.     Window        /* parent */,
  3370.     int            /* x */,
  3371.     int            /* y */
  3372. #endif
  3373. );
  3374.  
  3375. extern XResetScreenSaver(
  3376. #if NeedFunctionPrototypes
  3377.     Display*        /* display */
  3378. #endif
  3379. );
  3380.  
  3381. extern XResizeWindow(
  3382. #if NeedFunctionPrototypes
  3383.     Display*        /* display */,
  3384.     Window        /* w */,
  3385.     unsigned int    /* width */,
  3386.     unsigned int    /* height */
  3387. #endif
  3388. );
  3389.  
  3390. extern XRestackWindows(
  3391. #if NeedFunctionPrototypes
  3392.     Display*        /* display */,
  3393.     Window*        /* windows */,
  3394.     int            /* nwindows */
  3395. #endif
  3396. );
  3397.  
  3398. extern XRotateBuffers(
  3399. #if NeedFunctionPrototypes
  3400.     Display*        /* display */,
  3401.     int            /* rotate */
  3402. #endif
  3403. );
  3404.  
  3405. extern XRotateWindowProperties(
  3406. #if NeedFunctionPrototypes
  3407.     Display*        /* display */,
  3408.     Window        /* w */,
  3409.     Atom*        /* properties */,
  3410.     int            /* num_prop */,
  3411.     int            /* npositions */
  3412. #endif
  3413. );
  3414.  
  3415. extern int XScreenCount(
  3416. #if NeedFunctionPrototypes
  3417.     Display*        /* display */
  3418. #endif
  3419. );
  3420.  
  3421. extern XSelectInput(
  3422. #if NeedFunctionPrototypes
  3423.     Display*        /* display */,
  3424.     Window        /* w */,
  3425.     long        /* event_mask */
  3426. #endif
  3427. );
  3428.  
  3429. extern Status XSendEvent(
  3430. #if NeedFunctionPrototypes
  3431.     Display*        /* display */,
  3432.     Window        /* w */,
  3433.     Bool        /* propagate */,
  3434.     long        /* event_mask */,
  3435.     XEvent*        /* event_send */
  3436. #endif
  3437. );
  3438.  
  3439. extern XSetAccessControl(
  3440. #if NeedFunctionPrototypes
  3441.     Display*        /* display */,
  3442.     int            /* mode */
  3443. #endif
  3444. );
  3445.  
  3446. extern XSetArcMode(
  3447. #if NeedFunctionPrototypes
  3448.     Display*        /* display */,
  3449.     GC            /* gc */,
  3450.     int            /* arc_mode */
  3451. #endif
  3452. );
  3453.  
  3454. extern XSetBackground(
  3455. #if NeedFunctionPrototypes
  3456.     Display*        /* display */,
  3457.     GC            /* gc */,
  3458.     unsigned long    /* background */
  3459. #endif
  3460. );
  3461.  
  3462. extern XSetClipMask(
  3463. #if NeedFunctionPrototypes
  3464.     Display*        /* display */,
  3465.     GC            /* gc */,
  3466.     Pixmap        /* pixmap */
  3467. #endif
  3468. );
  3469.  
  3470. extern XSetClipOrigin(
  3471. #if NeedFunctionPrototypes
  3472.     Display*        /* display */,
  3473.     GC            /* gc */,
  3474.     int            /* clip_x_origin */,
  3475.     int            /* clip_y_origin */
  3476. #endif
  3477. );
  3478.  
  3479. extern XSetClipRectangles(
  3480. #if NeedFunctionPrototypes
  3481.     Display*        /* display */,
  3482.     GC            /* gc */,
  3483.     int            /* clip_x_origin */,
  3484.     int            /* clip_y_origin */,
  3485.     XRectangle*        /* rectangles */,
  3486.     int            /* n */,
  3487.     int            /* ordering */
  3488. #endif
  3489. );
  3490.  
  3491. extern XSetCloseDownMode(
  3492. #if NeedFunctionPrototypes
  3493.     Display*        /* display */,
  3494.     int            /* close_mode */
  3495. #endif
  3496. );
  3497.  
  3498. extern XSetCommand(
  3499. #if NeedFunctionPrototypes
  3500.     Display*        /* display */,
  3501.     Window        /* w */,
  3502.     char**        /* argv */,
  3503.     int            /* argc */
  3504. #endif
  3505. );
  3506.  
  3507. extern XSetDashes(
  3508. #if NeedFunctionPrototypes
  3509.     Display*        /* display */,
  3510.     GC            /* gc */,
  3511.     int            /* dash_offset */,
  3512.     _Xconst char*    /* dash_list */,
  3513.     int            /* n */
  3514. #endif
  3515. );
  3516.  
  3517. extern XSetFillRule(
  3518. #if NeedFunctionPrototypes
  3519.     Display*        /* display */,
  3520.     GC            /* gc */,
  3521.     int            /* fill_rule */
  3522. #endif
  3523. );
  3524.  
  3525. extern XSetFillStyle(
  3526. #if NeedFunctionPrototypes
  3527.     Display*        /* display */,
  3528.     GC            /* gc */,
  3529.     int            /* fill_style */
  3530. #endif
  3531. );
  3532.  
  3533. extern XSetFont(
  3534. #if NeedFunctionPrototypes
  3535.     Display*        /* display */,
  3536.     GC            /* gc */,
  3537.     Font        /* font */
  3538. #endif
  3539. );
  3540.  
  3541. extern XSetFontPath(
  3542. #if NeedFunctionPrototypes
  3543.     Display*        /* display */,
  3544.     char**        /* directories */,
  3545.     int            /* ndirs */         
  3546. #endif
  3547. );
  3548.  
  3549. extern XSetForeground(
  3550. #if NeedFunctionPrototypes
  3551.     Display*        /* display */,
  3552.     GC            /* gc */,
  3553.     unsigned long    /* foreground */
  3554. #endif
  3555. );
  3556.  
  3557. extern XSetFunction(
  3558. #if NeedFunctionPrototypes
  3559.     Display*        /* display */,
  3560.     GC            /* gc */,
  3561.     int            /* function */
  3562. #endif
  3563. );
  3564.  
  3565. extern XSetGraphicsExposures(
  3566. #if NeedFunctionPrototypes
  3567.     Display*        /* display */,
  3568.     GC            /* gc */,
  3569.     Bool        /* graphics_exposures */
  3570. #endif
  3571. );
  3572.  
  3573. extern XSetIconName(
  3574. #if NeedFunctionPrototypes
  3575.     Display*        /* display */,
  3576.     Window        /* w */,
  3577.     _Xconst char*    /* icon_name */
  3578. #endif
  3579. );
  3580.  
  3581. extern XSetInputFocus(
  3582. #if NeedFunctionPrototypes
  3583.     Display*        /* display */,
  3584.     Window        /* focus */,
  3585.     int            /* revert_to */,
  3586.     Time        /* time */
  3587. #endif
  3588. );
  3589.  
  3590. extern XSetLineAttributes(
  3591. #if NeedFunctionPrototypes
  3592.     Display*        /* display */,
  3593.     GC            /* gc */,
  3594.     unsigned int    /* line_width */,
  3595.     int            /* line_style */,
  3596.     int            /* cap_style */,
  3597.     int            /* join_style */
  3598. #endif
  3599. );
  3600.  
  3601. extern int XSetModifierMapping(
  3602. #if NeedFunctionPrototypes
  3603.     Display*        /* display */,
  3604.     XModifierKeymap*    /* modmap */
  3605. #endif
  3606. );
  3607.  
  3608. extern XSetPlaneMask(
  3609. #if NeedFunctionPrototypes
  3610.     Display*        /* display */,
  3611.     GC            /* gc */,
  3612.     unsigned long    /* plane_mask */
  3613. #endif
  3614. );
  3615.  
  3616. extern int XSetPointerMapping(
  3617. #if NeedFunctionPrototypes
  3618.     Display*        /* display */,
  3619.     _Xconst unsigned char*    /* map */,
  3620.     int            /* nmap */
  3621. #endif
  3622. );
  3623.  
  3624. extern XSetScreenSaver(
  3625. #if NeedFunctionPrototypes
  3626.     Display*        /* display */,
  3627.     int            /* timeout */,
  3628.     int            /* interval */,
  3629.     int            /* prefer_blanking */,
  3630.     int            /* allow_exposures */
  3631. #endif
  3632. );
  3633.  
  3634. extern XSetSelectionOwner(
  3635. #if NeedFunctionPrototypes
  3636.     Display*        /* display */,
  3637.     Atom            /* selection */,
  3638.     Window        /* owner */,
  3639.     Time        /* time */
  3640. #endif
  3641. );
  3642.  
  3643. extern XSetState(
  3644. #if NeedFunctionPrototypes
  3645.     Display*        /* display */,
  3646.     GC            /* gc */,
  3647.     unsigned long     /* foreground */,
  3648.     unsigned long    /* background */,
  3649.     int            /* function */,
  3650.     unsigned long    /* plane_mask */
  3651. #endif
  3652. );
  3653.  
  3654. extern XSetStipple(
  3655. #if NeedFunctionPrototypes
  3656.     Display*        /* display */,
  3657.     GC            /* gc */,
  3658.     Pixmap        /* stipple */
  3659. #endif
  3660. );
  3661.  
  3662. extern XSetSubwindowMode(
  3663. #if NeedFunctionPrototypes
  3664.     Display*        /* display */,
  3665.     GC            /* gc */,
  3666.     int            /* subwindow_mode */
  3667. #endif
  3668. );
  3669.  
  3670. extern XSetTSOrigin(
  3671. #if NeedFunctionPrototypes
  3672.     Display*        /* display */,
  3673.     GC            /* gc */,
  3674.     int            /* ts_x_origin */,
  3675.     int            /* ts_y_origin */
  3676. #endif
  3677. );
  3678.  
  3679. extern XSetTile(
  3680. #if NeedFunctionPrototypes
  3681.     Display*        /* display */,
  3682.     GC            /* gc */,
  3683.     Pixmap        /* tile */
  3684. #endif
  3685. );
  3686.  
  3687. extern XSetWindowBackground(
  3688. #if NeedFunctionPrototypes
  3689.     Display*        /* display */,
  3690.     Window        /* w */,
  3691.     unsigned long    /* background_pixel */
  3692. #endif
  3693. );
  3694.  
  3695. extern XSetWindowBackgroundPixmap(
  3696. #if NeedFunctionPrototypes
  3697.     Display*        /* display */,
  3698.     Window        /* w */,
  3699.     Pixmap        /* background_pixmap */
  3700. #endif
  3701. );
  3702.  
  3703. extern XSetWindowBorder(
  3704. #if NeedFunctionPrototypes
  3705.     Display*        /* display */,
  3706.     Window        /* w */,
  3707.     unsigned long    /* border_pixel */
  3708. #endif
  3709. );
  3710.  
  3711. extern XSetWindowBorderPixmap(
  3712. #if NeedFunctionPrototypes
  3713.     Display*        /* display */,
  3714.     Window        /* w */,
  3715.     Pixmap        /* border_pixmap */
  3716. #endif
  3717. );
  3718.  
  3719. extern XSetWindowBorderWidth(
  3720. #if NeedFunctionPrototypes
  3721.     Display*        /* display */,
  3722.     Window        /* w */,
  3723.     unsigned int    /* width */
  3724. #endif
  3725. );
  3726.  
  3727. extern XSetWindowColormap(
  3728. #if NeedFunctionPrototypes
  3729.     Display*        /* display */,
  3730.     Window        /* w */,
  3731.     Colormap        /* colormap */
  3732. #endif
  3733. );
  3734.  
  3735. extern XStoreBuffer(
  3736. #if NeedFunctionPrototypes
  3737.     Display*        /* display */,
  3738.     _Xconst char*    /* bytes */,
  3739.     int            /* nbytes */,
  3740.     int            /* buffer */
  3741. #endif
  3742. );
  3743.  
  3744. extern XStoreBytes(
  3745. #if NeedFunctionPrototypes
  3746.     Display*        /* display */,
  3747.     _Xconst char*    /* bytes */,
  3748.     int            /* nbytes */
  3749. #endif
  3750. );
  3751.  
  3752. extern XStoreColor(
  3753. #if NeedFunctionPrototypes
  3754.     Display*        /* display */,
  3755.     Colormap        /* colormap */,
  3756.     XColor*        /* color */
  3757. #endif
  3758. );
  3759.  
  3760. extern XStoreColors(
  3761. #if NeedFunctionPrototypes
  3762.     Display*        /* display */,
  3763.     Colormap        /* colormap */,
  3764.     XColor*        /* color */,
  3765.     int            /* ncolors */
  3766. #endif
  3767. );
  3768.  
  3769. extern XStoreName(
  3770. #if NeedFunctionPrototypes
  3771.     Display*        /* display */,
  3772.     Window        /* w */,
  3773.     _Xconst char*    /* window_name */
  3774. #endif
  3775. );
  3776.  
  3777. extern XStoreNamedColor(
  3778. #if NeedFunctionPrototypes
  3779.     Display*        /* display */,
  3780.     Colormap        /* colormap */,
  3781.     _Xconst char*    /* color */,
  3782.     unsigned long    /* pixel */,
  3783.     int            /* flags */
  3784. #endif
  3785. );
  3786.  
  3787. extern XSync(
  3788. #if NeedFunctionPrototypes
  3789.     Display*        /* display */,
  3790.     Bool        /* discard */
  3791. #endif
  3792. );
  3793.  
  3794. extern XTextExtents(
  3795. #if NeedFunctionPrototypes
  3796.     XFontStruct*    /* font_struct */,
  3797.     _Xconst char*    /* string */,
  3798.     int            /* nchars */,
  3799.     int*        /* direction_return */,
  3800.     int*        /* font_ascent_return */,
  3801.     int*        /* font_descent_return */,
  3802.     XCharStruct*    /* overall_return */
  3803. #endif
  3804. );
  3805.  
  3806. extern XTextExtents16(
  3807. #if NeedFunctionPrototypes
  3808.     XFontStruct*    /* font_struct */,
  3809.     _Xconst XChar2b*    /* string */,
  3810.     int            /* nchars */,
  3811.     int*        /* direction_return */,
  3812.     int*        /* font_ascent_return */,
  3813.     int*        /* font_descent_return */,
  3814.     XCharStruct*    /* overall_return */
  3815. #endif
  3816. );
  3817.  
  3818. extern int XTextWidth(
  3819. #if NeedFunctionPrototypes
  3820.     XFontStruct*    /* font_struct */,
  3821.     _Xconst char*    /* string */,
  3822.     int            /* count */
  3823. #endif
  3824. );
  3825.  
  3826. extern int XTextWidth16(
  3827. #if NeedFunctionPrototypes
  3828.     XFontStruct*    /* font_struct */,
  3829.     _Xconst XChar2b*    /* string */,
  3830.     int            /* count */
  3831. #endif
  3832. );
  3833.  
  3834. extern Bool XTranslateCoordinates(
  3835. #if NeedFunctionPrototypes
  3836.     Display*        /* display */,
  3837.     Window        /* src_w */,
  3838.     Window        /* dest_w */,
  3839.     int            /* src_x */,
  3840.     int            /* src_y */,
  3841.     int*        /* dest_x_return */,
  3842.     int*        /* dest_y_return */,
  3843.     Window*        /* child_return */
  3844. #endif
  3845. );
  3846.  
  3847. extern XUndefineCursor(
  3848. #if NeedFunctionPrototypes
  3849.     Display*        /* display */,
  3850.     Window        /* w */
  3851. #endif
  3852. );
  3853.  
  3854. extern XUngrabButton(
  3855. #if NeedFunctionPrototypes
  3856.     Display*        /* display */,
  3857.     unsigned int    /* button */,
  3858.     unsigned int    /* modifiers */,
  3859.     Window        /* grab_window */
  3860. #endif
  3861. );
  3862.  
  3863. extern XUngrabKey(
  3864. #if NeedFunctionPrototypes
  3865.     Display*        /* display */,
  3866.     int            /* keycode */,
  3867.     unsigned int    /* modifiers */,
  3868.     Window        /* grab_window */
  3869. #endif
  3870. );
  3871.  
  3872. extern XUngrabKeyboard(
  3873. #if NeedFunctionPrototypes
  3874.     Display*        /* display */,
  3875.     Time        /* time */
  3876. #endif
  3877. );
  3878.  
  3879. extern XUngrabPointer(
  3880. #if NeedFunctionPrototypes
  3881.     Display*        /* display */,
  3882.     Time        /* time */
  3883. #endif
  3884. );
  3885.  
  3886. extern XUngrabServer(
  3887. #if NeedFunctionPrototypes
  3888.     Display*        /* display */
  3889. #endif
  3890. );
  3891.  
  3892. extern XUninstallColormap(
  3893. #if NeedFunctionPrototypes
  3894.     Display*        /* display */,
  3895.     Colormap        /* colormap */
  3896. #endif
  3897. );
  3898.  
  3899. extern XUnloadFont(
  3900. #if NeedFunctionPrototypes
  3901.     Display*        /* display */,
  3902.     Font        /* font */
  3903. #endif
  3904. );
  3905.  
  3906. extern XUnmapSubwindows(
  3907. #if NeedFunctionPrototypes
  3908.     Display*        /* display */,
  3909.     Window        /* w */
  3910. #endif
  3911. );
  3912.  
  3913. extern XUnmapWindow(
  3914. #if NeedFunctionPrototypes
  3915.     Display*        /* display */,
  3916.     Window        /* w */
  3917. #endif
  3918. );
  3919.  
  3920. extern int XVendorRelease(
  3921. #if NeedFunctionPrototypes
  3922.     Display*        /* display */
  3923. #endif
  3924. );
  3925.  
  3926. extern XWarpPointer(
  3927. #if NeedFunctionPrototypes
  3928.     Display*        /* display */,
  3929.     Window        /* src_w */,
  3930.     Window        /* dest_w */,
  3931.     int            /* src_x */,
  3932.     int            /* src_y */,
  3933.     unsigned int    /* src_width */,
  3934.     unsigned int    /* src_height */,
  3935.     int            /* dest_x */,
  3936.     int            /* dest_y */         
  3937. #endif
  3938. );
  3939.  
  3940. extern int XWidthMMOfScreen(
  3941. #if NeedFunctionPrototypes
  3942.     Screen*        /* screen */
  3943. #endif
  3944. );
  3945.  
  3946. extern int XWidthOfScreen(
  3947. #if NeedFunctionPrototypes
  3948.     Screen*        /* screen */
  3949. #endif
  3950. );
  3951.  
  3952. extern XWindowEvent(
  3953. #if NeedFunctionPrototypes
  3954.     Display*        /* display */,
  3955.     Window        /* w */,
  3956.     long        /* event_mask */,
  3957.     XEvent*        /* event_return */
  3958. #endif
  3959. );
  3960.  
  3961. extern int XWriteBitmapFile(
  3962. #if NeedFunctionPrototypes
  3963.     Display*        /* display */,
  3964.     _Xconst char*    /* filename */,
  3965.     Pixmap        /* bitmap */,
  3966.     unsigned int    /* width */,
  3967.     unsigned int    /* height */,
  3968.     int            /* x_hot */,
  3969.     int            /* y_hot */             
  3970. #endif
  3971. );
  3972.  
  3973. extern Bool XSupportsLocale(
  3974. #if NeedFunctionPrototypes
  3975.     void
  3976. #endif
  3977. );
  3978.  
  3979. extern char *XSetLocaleModifiers(
  3980. #if NeedFunctionPrototypes
  3981.     _Xconst char*    /* modifier_list */
  3982. #endif
  3983. );
  3984.  
  3985. extern XFontSet XCreateFontSet(
  3986. #if NeedFunctionPrototypes
  3987.     Display*        /* display */,
  3988.     _Xconst char*    /* base_font_name_list */,
  3989.     char***        /* missing_charset_list */,
  3990.     int*        /* missing_charset_count */,
  3991.     char**        /* def_string */
  3992. #endif
  3993. );
  3994.  
  3995. extern void XFreeFontSet(
  3996. #if NeedFunctionPrototypes
  3997.     Display*        /* display */,
  3998.     XFontSet        /* font_set */
  3999. #endif
  4000. );
  4001.  
  4002. extern int XFontsOfFontSet(
  4003. #if NeedFunctionPrototypes
  4004.     XFontSet        /* font_set */,
  4005.     XFontStruct***    /* font_struct_list */,
  4006.     char***        /* font_name_list */
  4007. #endif
  4008. );
  4009.  
  4010. extern char *XBaseFontNameListOfFontSet(
  4011. #if NeedFunctionPrototypes
  4012.     XFontSet        /* font_set */
  4013. #endif
  4014. );
  4015.  
  4016. extern char *XLocaleOfFontSet(
  4017. #if NeedFunctionPrototypes
  4018.     XFontSet        /* font_set */
  4019. #endif
  4020. );
  4021.  
  4022. extern Bool XContextDependentDrawing(
  4023. #if NeedFunctionPrototypes
  4024.     XFontSet        /* font_set */
  4025. #endif
  4026. );
  4027.  
  4028. extern XFontSetExtents *XExtentsOfFontSet(
  4029. #if NeedFunctionPrototypes
  4030.     XFontSet        /* font_set */
  4031. #endif
  4032. );
  4033.  
  4034. extern int XmbTextEscapement(
  4035. #if NeedFunctionPrototypes
  4036.     XFontSet        /* font_set */,
  4037.     _Xconst char*    /* text */,
  4038.     int            /* bytes_text */
  4039. #endif
  4040. );
  4041.  
  4042. extern int XwcTextEscapement(
  4043. #if NeedFunctionPrototypes
  4044.     XFontSet        /* font_set */,
  4045.     wchar_t*        /* text */,
  4046.     int            /* num_wchars */
  4047. #endif
  4048. );
  4049.  
  4050. extern int XmbTextExtents(
  4051. #if NeedFunctionPrototypes
  4052.     XFontSet        /* font_set */,
  4053.     _Xconst char*    /* text */,
  4054.     int            /* bytes_text */,
  4055.     XRectangle*        /* overall_ink_return */,
  4056.     XRectangle*        /* overall_logical_return */
  4057. #endif
  4058. );
  4059.  
  4060. extern int XwcTextExtents(
  4061. #if NeedFunctionPrototypes
  4062.     XFontSet        /* font_set */,
  4063.     wchar_t*        /* text */,
  4064.     int            /* num_wchars */,
  4065.     XRectangle*        /* overall_ink_return */,
  4066.     XRectangle*        /* overall_logical_return */
  4067. #endif
  4068. );
  4069.  
  4070. extern Status XmbTextPerCharExtents(
  4071. #if NeedFunctionPrototypes
  4072.     XFontSet        /* font_set */,
  4073.     _Xconst char*    /* text */,
  4074.     int            /* bytes_text */,
  4075.     XRectangle*        /* ink_extents_buffer */,
  4076.     XRectangle*        /* logical_extents_buffer */,
  4077.     int            /* buffer_size */,
  4078.     int*        /* num_chars */,
  4079.     XRectangle*        /* overall_ink_return */,
  4080.     XRectangle*        /* overall_logical_return */
  4081. #endif
  4082. );
  4083.  
  4084. extern Status XwcTextPerCharExtents(
  4085. #if NeedFunctionPrototypes
  4086.     XFontSet        /* font_set */,
  4087.     wchar_t*        /* text */,
  4088.     int            /* num_wchars */,
  4089.     XRectangle*        /* ink_extents_buffer */,
  4090.     XRectangle*        /* logical_extents_buffer */,
  4091.     int            /* buffer_size */,
  4092.     int*        /* num_chars */,
  4093.     XRectangle*        /* overall_ink_return */,
  4094.     XRectangle*        /* overall_logical_return */
  4095. #endif
  4096. );
  4097.  
  4098. extern void XmbDrawText(
  4099. #if NeedFunctionPrototypes
  4100.     Display*        /* display */,
  4101.     Drawable        /* d */,
  4102.     GC            /* gc */,
  4103.     int            /* x */,
  4104.     int            /* y */,
  4105.     XmbTextItem*    /* text_items */,
  4106.     int            /* nitems */
  4107. #endif
  4108. );
  4109.  
  4110. extern void XwcDrawText(
  4111. #if NeedFunctionPrototypes
  4112.     Display*        /* display */,
  4113.     Drawable        /* d */,
  4114.     GC            /* gc */,
  4115.     int            /* x */,
  4116.     int            /* y */,
  4117.     XwcTextItem*    /* text_items */,
  4118.     int            /* nitems */
  4119. #endif
  4120. );
  4121.  
  4122. extern void XmbDrawString(
  4123. #if NeedFunctionPrototypes
  4124.     Display*        /* display */,
  4125.     Drawable        /* d */,
  4126.     XFontSet        /* font_set */,
  4127.     GC            /* gc */,
  4128.     int            /* x */,
  4129.     int            /* y */,
  4130.     _Xconst char*    /* text */,
  4131.     int            /* bytes_text */
  4132. #endif
  4133. );
  4134.  
  4135. extern void XwcDrawString(
  4136. #if NeedFunctionPrototypes
  4137.     Display*        /* display */,
  4138.     Drawable        /* d */,
  4139.     XFontSet        /* font_set */,
  4140.     GC            /* gc */,
  4141.     int            /* x */,
  4142.     int            /* y */,
  4143.     wchar_t*        /* text */,
  4144.     int            /* num_wchars */
  4145. #endif
  4146. );
  4147.  
  4148. extern void XmbDrawImageString(
  4149. #if NeedFunctionPrototypes
  4150.     Display*        /* display */,
  4151.     Drawable        /* d */,
  4152.     XFontSet        /* font_set */,
  4153.     GC            /* gc */,
  4154.     int            /* x */,
  4155.     int            /* y */,
  4156.     _Xconst char*    /* text */,
  4157.     int            /* bytes_text */
  4158. #endif
  4159. );
  4160.  
  4161. extern void XwcDrawImageString(
  4162. #if NeedFunctionPrototypes
  4163.     Display*        /* display */,
  4164.     Drawable        /* d */,
  4165.     XFontSet        /* font_set */,
  4166.     GC            /* gc */,
  4167.     int            /* x */,
  4168.     int            /* y */,
  4169.     wchar_t*        /* text */,
  4170.     int            /* num_wchars */
  4171. #endif
  4172. );
  4173.  
  4174. extern XIM XOpenIM(
  4175. #if NeedFunctionPrototypes
  4176.     Display*            /* dpy */,
  4177.     struct _XrmHashBucketRec*    /* rdb */,
  4178.     char*            /* res_name */,
  4179.     char*            /* res_class */
  4180. #endif
  4181. );
  4182.  
  4183. extern Status XCloseIM(
  4184. #if NeedFunctionPrototypes
  4185.     XIM /* im */
  4186. #endif
  4187. );
  4188.  
  4189. extern char *XGetIMValues(
  4190. #if NeedVarargsPrototypes
  4191.     XIM /* im */, ...
  4192. #endif
  4193. );
  4194.  
  4195. extern Display *XDisplayOfIM(
  4196. #if NeedFunctionPrototypes
  4197.     XIM /* im */
  4198. #endif
  4199. );
  4200.  
  4201. extern char *XLocaleOfIM(
  4202. #if NeedFunctionPrototypes
  4203.     XIM /* im*/
  4204. #endif
  4205. );
  4206.  
  4207. extern XIC XCreateIC(
  4208. #if NeedVarargsPrototypes
  4209.     XIM /* im */, ...
  4210. #endif
  4211. );
  4212.  
  4213. extern void XDestroyIC(
  4214. #if NeedFunctionPrototypes
  4215.     XIC /* ic */
  4216. #endif
  4217. );
  4218.  
  4219. extern void XSetICFocus(
  4220. #if NeedFunctionPrototypes
  4221.     XIC /* ic */
  4222. #endif
  4223. );
  4224.  
  4225. extern void XUnsetICFocus(
  4226. #if NeedFunctionPrototypes
  4227.     XIC /* ic */
  4228. #endif
  4229. );
  4230.  
  4231. extern wchar_t *XwcResetIC(
  4232. #if NeedFunctionPrototypes
  4233.     XIC /* ic */
  4234. #endif
  4235. );
  4236.  
  4237. extern char *XmbResetIC(
  4238. #if NeedFunctionPrototypes
  4239.     XIC /* ic */
  4240. #endif
  4241. );
  4242.  
  4243. extern char *XSetICValues(
  4244. #if NeedVarargsPrototypes
  4245.     XIC /* ic */, ...
  4246. #endif
  4247. );
  4248.  
  4249. extern char *XGetICValues(
  4250. #if NeedVarargsPrototypes
  4251.     XIC /* ic */, ...
  4252. #endif
  4253. );
  4254.  
  4255. extern XIM XIMOfIC(
  4256. #if NeedFunctionPrototypes
  4257.     XIC /* ic */
  4258. #endif
  4259. );
  4260.  
  4261. extern Bool XFilterEvent(
  4262. #if NeedFunctionPrototypes
  4263.     XEvent*    /* event */,
  4264.     Window    /* window */
  4265. #endif
  4266. );
  4267.  
  4268. extern int XmbLookupString(
  4269. #if NeedFunctionPrototypes
  4270.     XIC            /* ic */,
  4271.     XKeyPressedEvent*    /* event */,
  4272.     char*        /* buffer_return */,
  4273.     int            /* bytes_buffer */,
  4274.     KeySym*        /* keysym_return */,
  4275.     Status*        /* status_return */
  4276. #endif
  4277. );
  4278.  
  4279. extern int XwcLookupString(
  4280. #if NeedFunctionPrototypes
  4281.     XIC            /* ic */,
  4282.     XKeyPressedEvent*    /* event */,
  4283.     wchar_t*        /* buffer_return */,
  4284.     int            /* wchars_buffer */,
  4285.     KeySym*        /* keysym_return */,
  4286.     Status*        /* status_return */
  4287. #endif
  4288. );
  4289.  
  4290. extern XVaNestedList XVaCreateNestedList(
  4291. #if NeedVarargsPrototypes
  4292.     int /*unused*/, ...
  4293. #endif
  4294. );
  4295.  
  4296. _XFUNCPROTOEND
  4297.  
  4298. #endif /* _XLIB_H_ */
  4299.